NoClassDeFoundException-----解决的终极之道
来源:互联网 发布:ice框架 java 编辑:程序博客网 时间:2024/04/28 15:08
自从引入了友盟分享的jar包以及各种so文件之后,我的应用就报各种的NoClassDeFoundException,刚开始的时候是报
Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.umeng.socialize.d) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.
但是后来不知道怎么滴,虽然报这个错误,但是应用还能装到手机上,但是一运行就会报NoClassDeFoundException,
甚至在周六,在家躺着休息都不安心,终于潜入海中,找答案!!!!
MD!功夫不负有心人,在友盟论坛上终于找到了解决问题的办法。。。
附上链接:
http://www.cnblogs.com/yeahgis/p/4660873.html
从这个链接引向了另外一个StackOverFlow的链接:
http://stackoverflow.com/questions/27377080/after-update-of-as-to-1-0-getting-method-id-not-in-0-0xffff-65536-error-i
我的解决办法就是按照上面的解决办法设置的。。终于应用恢复正常了!!!
附上我的gradle文件
android{ defaultConfig { minSdkVersion 11 targetSdkVersion 23 versionCode 3 versionName PROJECT_VERSION_NAME multiDexEnabled true } dexOptions { preDexLibraries true javaMaxHeapSize "4g" incremental true dexInProcess = true }}
dependencies {compile 'com.android.support:multidex:1.0.0'}
然后让自己的Application 继承MultiDexApplication ,在清单文件里面一定要声明自己的Application
android:name=".Profile"
当然,这里我是自己写了Application,上面链接里面,作者也说了如果自己没有写Application的解决方法。
希望能帮助到需要的童鞋,不要向我一样走弯路了。
等我把项目完成,会再写个关于分享的总结。这里面还是有坑要采的!
再附上一个深度了解的链接:
https://developer.android.com/studio/build/multidex.html
- NoClassDeFoundException-----解决的终极之道
- 网站安全的终极解决之WEB
- Java开发中的乱码解决之终极之道
- adb 命令之 终极解决
- adb 命令之 终极解决
- “汉语编程”是解决安全问题的终极之路?
- 编码讨论---乱码问题之终极解决
- MS SQL安装之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- 编码讨论---乱码问题之终极解决
- JSP乱码解决之终极篇
- 并查集基础
- 【POJ】2377 - Bad Cowtractors(最大生成树)
- _asm int 3 软件中断
- Android Studio魔法手指,让SDK集成快一点,再快一点!
- ios 传入c 代码回调的使用
- NoClassDeFoundException-----解决的终极之道
- lsof 查看进程打开那些文件 或者 查看文件给那个进程使用
- NSMutableArray的初始化
- android之旅----源泉
- Swift开发-保持屏幕常亮
- HDU 2586 (Tarjan)
- 关于网页F12后的世界
- 查询 只选择必要数据
- 【杭电oj1232】畅通工程