Android studio编程时出现的错误:unspecified on project app resolves to an APK archive which is not supported
2016-12-11 21:15
609 查看
用Android Studio中导入第三方库工程的时候出现的问题:
Error:Dependency MyApplication.libraries:MaterialDesign:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: D:\ADTBundle\StudioWorkspace\MyApplication\libraries\MaterialDesign\build\outputs\apk\MaterialDesign-release-unsigned.apk
出现该问题unspecified on project app resolves to an APK archive which is not supported as a compilation dependency的问题可能是:创建了两个Module,其中一个Module依赖另一个Module而导致了出现该问题;
在导入的那个第三方库的build.gradle,里面可以看到:
apply plugin: 'com.android.application' 这句话是Gradle将导入的第三方库编译称为application,也就是apk,这就是问题的所在;
解决方法:将上面该句改为:
apply plugin: 'com.android.library'
此时,Gradle将编译称为一个Library,也就是库,
运行之后,如果出现这个问题:Error:Library projects cannot set applicationId. applicationId is set to 'package_name' in default config.
那是因为这个库不允许设置applicationId,
将第三方库的build.gradle:
android — defaultConfig[u] 中的
[/u]applicationId
删除 即可;
然后问题即可解决~
相关文章推荐
- New Module时报异常:unspecified on project app resolves to an APK archive which is not supported
- Android Studio 报错:unspecified on project app resolves to an APK archive which is not supported解决方案
- Android Studio添加应用作为依赖时报错Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: 及其解决方案
- Android Studio依赖项目出现unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio添加应用作为依赖时报错Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is not
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- 新建Module作为依赖库后出现“unspecified on project app resolves to an APK archive which……”错误的解决方法
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- (转)Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio 解决unspecified on project app resolves to an APK archive which is not supported
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- unspecified on project XXX resolves to an APK archive which is not supported as a compilation depend