[url]http://blog.youkuaiyun.com/m694449212/article/details/14214507[/url]
java.lang.NoClassDefFoundError
在升级ADT 18版本后,在编译载有友盟SDK后出现如下错误,
E/AndroidRuntime(497): java.lang.NoClassDefFoundError: com.mobclick.android.MobclickAgent
解决办法1:
ADT 18对引用的jar有要求,要求jar包要放到项目下的libs里才可以找到,否则apk不会包含该jar包,所以会有类型引用异常的错误。之前是放在lib中不是libs 修改后正常
解决办法2:
Android中引入第三方Jar包的方法(java.lang.NoClassDefFoundError解决办法)
1、在工程下新建lib文件夹,将需要的第三方包拷贝进来。
2、将引用的第三方包,添加进工作的build path。
3、(关键的一步)将lib设为源文件夹。如果不设置,则程序编译可以通过,但运行的时候,会报:
java.lang.NoClassDefFoundError
最近重新安装了下android开发环境,发现在调整页面的时候 ,老是报以下错误,导致无法静态显示ui效果。
Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
Failed to find style 'textViewStyle' in current theme
解决方法如下:
layout预览界面(Graphic Layout),右上角有个Theme的选择项,默认为notitle,根据喜好随意设定值,我们这里设定为android以前默认的Theme.black.
java.lang.NoClassDefFoundError
在升级ADT 18版本后,在编译载有友盟SDK后出现如下错误,
E/AndroidRuntime(497): java.lang.NoClassDefFoundError: com.mobclick.android.MobclickAgent
解决办法1:
ADT 18对引用的jar有要求,要求jar包要放到项目下的libs里才可以找到,否则apk不会包含该jar包,所以会有类型引用异常的错误。之前是放在lib中不是libs 修改后正常
解决办法2:
Android中引入第三方Jar包的方法(java.lang.NoClassDefFoundError解决办法)
1、在工程下新建lib文件夹,将需要的第三方包拷贝进来。
2、将引用的第三方包,添加进工作的build path。
3、(关键的一步)将lib设为源文件夹。如果不设置,则程序编译可以通过,但运行的时候,会报:
java.lang.NoClassDefFoundError
最近重新安装了下android开发环境,发现在调整页面的时候 ,老是报以下错误,导致无法静态显示ui效果。
Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
Failed to find style 'textViewStyle' in current theme
解决方法如下:
layout预览界面(Graphic Layout),右上角有个Theme的选择项,默认为notitle,根据喜好随意设定值,我们这里设定为android以前默认的Theme.black.