使用Zendesk SDK的Android应用程序崩溃与java没有这样的字段错误

时间:2016-06-21 06:40:22

标签: android zendesk zendesk-app

我正在使用ZENDESK Android SDK并尝试打开支持活动,如下所示:

new com.zendesk.sdk.support.SupportActivity.Builder().listCategories().show(this);

但它崩溃时出现以下错误:

java.lang.NoSuchFieldError: No static field support_search_input of type I in class Lcom/zendesk/sdk/R$id; or its superclasses (declaration of 'com.zendesk.sdk.R$id' appears in /data/data/nl.tirato.RoomEasy/files/instant-run/dex/slice-slice_2-classes.dex)
at com.zendesk.sdk.support.SupportActivity.onCreate(SupportActivity.java:205)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

我正在使用最新的sdk:

compile group: 'com.zendesk', name: 'sdk', version: '1.6.1.1'
compile group: 'com.zendesk', name: 'sdk-providers', version:'1.6.1.1'

我的活动是扩展 AppCompatActivity

感谢任何帮助。

由于

2 个答案:

答案 0 :(得分:1)

您的资源文件中是否还有support_search_input的定义?这可能是命名中的冲突。

答案 1 :(得分:0)

嗨,只需将依赖项替换为版本compile group: 'com.zendesk', name: 'sdk', version: '1.10.0.1'