问题描述
导入easemob-sdk-2.2.5中的uidemo(2个都试过),编译正常,启动的时候报错,真机模拟器都试过环境:api23,adt23,buildtools24,eclipse 报错log: 01-13 07:19:46.063: E/dalvikvm(30565): Could not find class 'com.easemob.chatuidemo.ui.MainActivity', referenced from method com.easemob.chatuidemo.DemoHelper.onConnectionConflict01-13 07:19:46.064: E/dalvikvm(30565): Could not find class 'com.easemob.chatuidemo.ui.MainActivity', referenced from method com.easemob.chatuidemo.DemoHelper.onCurrentAccountRemoved01-13 07:19:46.065: E/dalvikvm(30565): Could not find class 'com.easemob.chatuidemo.DemoHelper$6', referenced from method com.easemob.chatuidemo.DemoHelper.registerEventListener01-13 07:19:46.069: E/dalvikvm(30565): Could not find class 'com.easemob.chatuidemo.DemoHelper$5', referenced from method com.easemob.chatuidemo.DemoHelper.setGlobalListeners01-13 07:19:46.069: E/dalvikvm(30565): Could not find class 'com.easemob.easeui.domain.EaseUser', referenced from method com.easemob.chatuidemo.DemoHelper.updateContactList01-13 07:19:46.086: E/AndroidRuntime(30565): FATAL EXCEPTION: main01-13 07:19:46.086: E/AndroidRuntime(30565): Process: com.easemob.chatuidemo, PID: 3056501-13 07:19:46.086: E/AndroidRuntime(30565): java.lang.NoClassDefFoundError: com.easemob.chat.EMChat01-13 07:19:46.086: E/AndroidRuntime(30565): at com.easemob.easeui.controller.EaseUI.init(EaseUI.java:118)01-13 07:19:46.086: E/AndroidRuntime(30565): at com.easemob.chatuidemo.DemoHelper.init(DemoHelper.java:153)01-13 07:19:46.086: E/AndroidRuntime(30565): at com.easemob.chatuidemo.DemoApplication.onCreate(DemoApplication.java:39)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4582)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.app.ActivityThread.access$1500(ActivityThread.java:151)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.os.Handler.dispatchMessage(Handler.java:110)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.os.Looper.loop(Looper.java:193)01-13 07:19:46.086: E/AndroidRuntime(30565): at android.app.ActivityThread.main(ActivityThread.java:5333)01-13 07:19:46.086: E/AndroidRuntime(30565): at java.lang.reflect.Method.invokeNative(Native Method)01-13 07:19:46.086: E/AndroidRuntime(30565): at java.lang.reflect.Method.invoke(Method.java:515)01-13 07:19:46.086: E/AndroidRuntime(30565): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)01-13 07:19:46.086: E/AndroidRuntime(30565): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)01-13 07:19:46.086: E/AndroidRuntime(30565): at dalvik.system.NativeStart.main(Native Method)
解决方案
同上问题,官方demo无法用,但是apk能用,难道是签名问题?
解决方案二:
确定导入什么都没有动的情况么?