android studio导jar包找不到类的解决方法

今天更新了universal-image-loader-1.9.5.jar文件,studio死活找不到其中相关的类,上网百度试了很多办法,总算解决了,具体方法跟一篇老外的帖子的差不多,这里分享下。

 

解决步骤:

Something went wrong in incremental build system. One of this should help:

  1. Menu Build -> Rebuild project
  2. Delete folder /build
  3. Close Android Studio, delete /build folder
  4. Right click on your project -> "Open module settings" -> Dependencies tab -> check if Export is checked for your library
来自老外的帖子http://stackoverflow.com/questions/17724642/android-studio-java-lang-noclassdeffounderror  

 

参考文章:http://www.oschina.net/question/2263525_180149

 

这个问题经常发生在build.gradle如下配置的时候:

compile fileTree(dir: 'libs', include: ['*.jar'])

 

如果实在解决不了,就在build.gradle里面加上比如下面的引用,studio可能有时候发现不了jar包,加上下面的代码就能骗过studio了,bulid成功后删除就好了。

compile files('libs/umeng_social_sdk.jar')

 

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

相关文章

安装环境都很简单,就是下载工具需要在华为开发者联盟里注册...
上传的方式有两种,第一种是通过bintray官方出的插件bintray...
转载自: 完美解决Error:SSLpeershutdownincorrectly打开gr...
https://www.jianshu.com/p/9220227cdfb3buildscript{ext.ko...
Markdown版本笔记我的GitHub首页我的博客我的微信我的邮箱My...
 跟着教程做的,已经有了JDK,直接进行后面的步骤,下载安装...