Android Studio 报错:unspecified on project app resolves to an APK archive which is not supported解决方案
来源:互联网 发布:软件著作权申请表下载 编辑:程序博客网 时间:2024/05/16 09:50
现有module A 和module B两个工程,现在把A作为主工程,把B作为library给A来使用。编译之后会报错:
Error:Dependency MaterialDesignTest:mine:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency.
出现该问题的原因如下:
在B工程的build.gradle中出现了语句:
apply plugin: 'com.android.application'此时,编译器会把module B编译成apk。解决方案是把application换成library,如下:
apply plugin: 'com.android.library'搞定!
如果module B是在android studio中新建项目,则还需要将defaultConfig下的
applicationId "com.example.mine"
语句删掉。至于原因,因为之前需要把module B编译成application,就需要制定applicationgID。现如今,我们的是把module B作为library来使用,自然不需要画蛇添足的给它制定applicationgID。否则会报如下错误:Error: Library projects cannot set applicationId. applicationId is set to "XXXXXXXXX" in default config
0 0
- 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
- 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
- New Module时报异常: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
- Android Studio解决Error:Dependency Puddings:videosdk1218:unspecified on project app resolves to an APK
- 新建Module作为依赖库后出现“unspecified on project app resolves to an APK archive which……”错误的解决方法
- android studio:Error:Dependency XXX:common:unspecified on project resource resolves to an APK
- Android Studio project with path '... ' could not be found in project ' app' 报错解决方案
- React Native学习笔记之--在LisvView的cell中调用TouchableOpacity的onPress方法时报错
- 先序,中序,后序,求叶子结点数,深度,拷贝,几种二叉树的常见递归使用方法
- 同步类容器和并发类容器
- tar和zip的相关用法
- Java设计模式分为创建模式, 结构模式, 行为模式 3种类型
- Android Studio 报错:unspecified on project app resolves to an APK archive which is not supported解决方案
- Yii2 使用 QQ 和 Weibo 第三方登录源码
- Java学习篇之SQL语句操作数据表中的数据(增删改)
- 文章标题
- 《THING IN JAVA》 12章通过异常处理错误-读书笔记
- MySQL的InnoDB索引原理详解
- 使用supervisor提高nodejs调试效率
- python psutil模块
- Scala学习笔记Day1