SDK V2 Android error NoSuchMethodError

7 Commentaires

  • Greg - Community Manager
    Zendesk Developer Support

    Hi Nur Sulaeman! Could you provide the following information please?

    • What version of the Zendesk for Android SDK are you using?
    • Please make sure you've enabled logging for your SDK implementation. Is your implementation throwing any errors?
    • Please provide the code where you've initialized the SDK.
    • Finally, if there is any more info you can provide (problematic code, sample project, etc), that would be great!
    0
  • LN Andrieux

    Hi,

    we're starting to see the same crash since we bumped from 2.0.0 to 2.2.0

     

    Fatal Exception: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/Boolean;Lzendesk/messaging/AttachmentSettings;)V in class Lzendesk/messaging/Update$State$UpdateInputFieldState; or its super classes (declaration of 'zendesk.messaging.Update$State$UpdateInputFieldState' appears in /data/app/...-sdwCZyqq0rhm8Fse9PbrvA==/base.apk!classes6.dex)
    at zendesk.messaging.MessagingModel.<clinit>(MessagingModel.java:37)
    at zendesk.messaging.MessagingModel_Factory.get(MessagingModel_Factory.java:34)
    at zendesk.messaging.MessagingModel_Factory.get(MessagingModel_Factory.java:9)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
    at zendesk.messaging.MessagingViewModel_Factory.get(MessagingViewModel_Factory.java:20)
    at zendesk.messaging.MessagingViewModel_Factory.get(MessagingViewModel_Factory.java:7)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
    at zendesk.messaging.DaggerMessagingComponent.messagingViewModel(DaggerMessagingComponent.java:80)
    at zendesk.messaging.MessagingActivity.onCreate(MessagingActivity.java:109)
    at android.app.Activity.performCreate(Activity.java:8066)
    at android.app.Activity.performCreate(Activity.java:8054)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3733)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3939)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2373)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:213)
    at android.app.ActivityThread.main(ActivityThread.java:8147)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
    0
  • Greg - Community Manager
    Zendesk Developer Support

    Hi LN Andrieux! Could you please share the information that I requested in my above post?

    0
  • Nur Sulaeman

    Hello All' sorry I was late to reply to a message, I have successfully solved the error

    LN Andrieux maybe there is still an old code that hasn't been deleted, if you find an old code like this

    Zendesk.INSTANCE.setIdentity(identity), You don't need to use it again and delete it

    if a different case can be informed again

    Thank you Greg for attention

    1
  • Greg - Community Manager
    Zendesk Developer Support

    Thank you for the update, Nur!

    0
  • Julio Ribeiro

    Hi, I'm having the exactly same issue when I updated to 5.0.0 version, and I can't find any solution, I need to change the chat activity to a request activity to stop crashing, hope you guys can give me some light on it.
     
    This is how I initialize Zendesk:

     
    Zendesk.INSTANCE.init(
    this,
    getString(R.string.zendesk_url),
    getString(R.string.zendesk_app_id),
    getString(R.string.zendesk_client_id)
    )

    Support.INSTANCE.init(Zendesk.INSTANCE)

    Zendesk.INSTANCE.setIdentity(
    AnonymousIdentity.Builder().withNameIdentifier(
    getString(R.string.zendesk_chat_name_identifier)
    ).withEmailIdentifier(
    null
    ).build()
    )

    Chat.INSTANCE.init(context, getString(R.string.zendesk_account_key))

    And this is how I started the chat activity:

    fun startChatV2() {
    val chatConfiguration = ChatConfiguration.builder().withNameFieldStatus(PreChatFormFieldStatus.REQUIRED)
    .withEmailFieldStatus(PreChatFormFieldStatus.REQUIRED).withPhoneFieldStatus(PreChatFormFieldStatus.REQUIRED)
    .withAgentAvailabilityEnabled(true).withPreChatFormEnabled(true).build()

    val profileProvider = Chat.INSTANCE.providers()!!.profileProvider()

    val visitorInfo = VisitorInfo.builder().withName(student).build()
    profileProvider.setVisitorInfo(visitorInfo, null)

    MessagingActivity.builder().withEngines(ChatEngine.engine()).show(context, chatConfiguration)
    }
    0
  • Jonathan Bibas

    Hi, I can tell you that I had the same error and got it fixed by removing the extra line in the build:


    implementation group: 'com.zendesk', name: 'support', version: '5.0.2'


    I hope this helps.

    0

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk