注册

环信集成初始化时报NoClassDefFoundError:

在华为荣耀6.0系统上可以正常运行,在三星4.3的手机上初始化失败:

1.集成时已将将Demo中的 DemoHelper和DemoModel拷入到了自己的项目下面
2.在Application的onCreate()中调用DemoHelper.getInstance().init(this);进行初始化报错如下:
threadid=1: thread exiting with uncaught exception (group=0x422ad700)
12-22 14:29:26.710 6568-6568/? W/System.err: java.lang.NoClassDefFoundError: com.lingfeng.appdemo.functions.chat.DemoModel
12-22 14:29:26.710 6568-6568/? W/System.err: at com.lingfeng.appdemo.functions.chat.DemoHelper.init(DemoHelper.java:154)
12-22 14:29:26.710 6568-6568/? W/System.err: at com.lingfeng.appdemo.MyApplication.onCreate(MyApplication.java:48)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4702)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.app.ActivityThread.access$1400(ActivityThread.java:168)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1389)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.os.Looper.loop(Looper.java:137)
12-22 14:29:26.710 6568-6568/? W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5493)
12-22 14:29:26.710 6568-6568/? W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
12-22 14:29:26.710 6568-6568/? W/System.err: at java.lang.reflect.Method.invoke(Method.java:525)
12-22 14:29:26.710 6568-6568/? W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209)
12-22 14:29:26.710 6568-6568/? W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
12-22 14:29:26.710 6568-6568/? W/System.err: at dalvik.system.NativeStart.main(Native Method)
哪位大神帮忙看看,谢谢
已邀请:
是否是直接依赖easeui的,如果是依赖的easeui的话,需要做easeui的初始化
EaseUI.getInstance().init(applicationContext, options);
 
在application里面加入
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base); MultiDex.install(this);
}这段代码
 

要回复问题请先登录注册