Android Studio添加应用作为依赖时报错Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: 及其解决方案

Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: E:\Androidcode\androidstudioproject\MonthText\xlistview\build\outputs\apk\xlistview-release-unsigned.apk

解决方案:把依赖库的build.gradle文件中最上边的

 错误: apply plugin: 'com.android.application'
改为: apply plugin: 'com.android.library'
还有:要删除defaultConfig中的applicationId "com.limxing.xlistview"
这个报错主要原因是因为依赖库之前是一个独立的应用,需要把它的设置为库,而不是应用 删除applicationId "com.limxing.xlistview"的原因是:applicationId 这是应用才有的id,库则没有,所以要删除
解决方案引用自(原文地址):http://www.07net01.com/2015/08/917039.html
上一篇:Android Studio 解决unspecified on project app resolves to an APK archive which is not supported


下一篇:Session, Cookie, Web.config中的cookieless总结