码迷,mamicode.com
首页 > 移动开发 > 详细

Android 编译错误

时间:2016-01-09 23:08:43      阅读:431      评论:0      收藏:0      [点我收藏+]

标签:

本人使用的是Android studio1.3版本,前几天调试通过的项目,现在编译出现了错误。错误信息如下

1 Project app: apk dependencies can only be jars. android:mgimlibs:aar:unspecified is an Android Library.
2 Project app: apk dependencies can only be jars. com.android.support:appcompat-v7:aar:19.1.0 is an Android Library.

并没有升级版本,觉得很奇怪。在尝试了许多办法后,终于找到了解决办法

在gradle文件中修改如下代码,将

 1     apk project(:mgimlibs)
 2     apk fileTree(include: [*.jar], dir: libs)
 3 
 4     apk com.android.support:appcompat-v7:19.+
 5     apk com.google.protobuf:protobuf-java:2.6.1
 6     apk de.greenrobot:eventbus:2.4.0
 7     apk de.greenrobot:greendao:1.3.7
 8     apk com.google.code.gson:gson:2.3.1
 9     apk com.squareup.okhttp:okhttp:2.0.0
10     apk com.squareup.okhttp:okhttp-urlconnection:2.0.0
11     apk commons-io:commons-io:2.4

修改为:

 1    apk fileTree(include: [*.jar], dir: libs)
 2 
 3     compile  com.google.protobuf:protobuf-java:2.6.1
 4     compile  de.greenrobot:eventbus:2.4.0
 5     compile  de.greenrobot:greendao:1.3.7
 6     compile  com.google.code.gson:gson:2.3.1
 7     compile  com.squareup.okhttp:okhttp:2.0.0
 8     compile  com.squareup.okhttp:okhttp-urlconnection:2.0.0
 9     compile  commons-io:commons-io:2.4
10     compile  com.android.support:appcompat-v7:19.+
11     compile project(:mgimlibs)

然后在进行编辑就可以通过了。

Android 编译错误

标签:

原文地址:http://www.cnblogs.com/yuqt/p/5117448.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!