Library Publication 时遇到 "more than one library with package name" 错误的解决方法
- 还是只需要选择application的variant就可以直接打包
- 改动在于,让 [application依赖的library的variant] 被 [application的variant] 控制
- 在library中设置让library发布自己的全部variant:android.publishNonDefault = true
- 然后在application中的reference中标明不同的 [application的variant] 依赖的不同的 [library具体的variant] :debugCompile project(path: ':Library', configuration: 'debug')
- 假设有这样一个多模块项目:
- 应用A依赖库B和库C,同时库B和库C又都依赖库D
- 在库D上使用了新特性发布全版本,然后在库C上使用新特性控制:当C是debug的时候D也是debug、C是release的时候D也是release
- 同时在C上也发布全版本,A通过新特性控制C的版本就像C控制D一样
- 而A对B不做控制,B对D也不做控制
- 这时,但是如果你进行debug构建,就会出现问题
- 因为当应用A是debug的时候,库C是被新特性控制成debug的了,同样D也是debug,另一边库B只默认构建release版本,就自然使用了release,而库B依赖的库D因为是普通依赖,自然也是默认的release
- 这样整个项目中就会存在一个debug的库D和一个release的库D,Gradle就报了构建错误:more than one library with package name:XXX
- (如果你对应用A进行release构建,不会有问题,可以自己推理一下原因)
Library Publication 时遇到 "more than one library with package name" 错误的解决方法的更多相关文章
- 【Azure 应用服务】PHP应用部署在App Service for Linux环境中,上传文件大于1MB时,遇见了413 Request Entity Too Large 错误的解决方法
问题描述 在PHP项目部署在App Service后,上传文件如果大于1MB就会遇见 413 Request Entity Too Large 的问题. 问题解决 目前这个问题,首先需要分析应用所在的 ...
- 在使用pydelicious时出现HTTP Error 500: Internal Server Error的错误的解决方法:
问题:在学习<集体智慧编程>的过程中,第二章中如果你遇到了pydelicious.PyDeliciousException: HTTP Error 500: Internal Server ...
- Eclipse启动时发生An internal error occurred during: "Initializing Java Tooling".错误的解决方法
问题描述: Eclipse启动时发生An internal error occurred during: "Initializing JavaTooling".错误的解决方法 解决 ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动
参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!
启动 Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误的解决方法 http://blog.csdn.net/z ...
- MyEclipse+Tomcat 启动时出现A configuration error occured during startup错误的解决方法
MyEclipse+Tomcat 启动时出现A configuration error occured during startup错误的解决方法 分类: javaweb2013-06-03 14:4 ...
- Apache commons StringUtils 在运行时出现NoClassDefError错误的解决方法
Apache commons StringUtils 在运行时出现NoClassDefError错误的解决方法 在用tomcat运行WEB项目,并且使用了StringUtils包的时候,会出现 jav ...
- jquery-easyui的datagrid在checkbox多选时,行选中不正确应,去除高亮的解决方法
jquery-easyui的datagrid在checkbox多选时,行选中不正确应,去除高亮的解决方法 工作中用到一个具有多选功能的easyui-datagrid在处理cell的点击事件时,不同 ...
- 安装Office时出现windows installer服务不能更新一个或多个受保护的windows文件错误的解决方法
今天在Windows XP上安装Microsoft Office 2010时,总是遇到“Windows Installer服务不能更新一个或多个受保护的windows文件,安装失败,正在回滚更改”提示 ...
随机推荐
- [Python] io 模块之 open() 方法
io.open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True) 打开file ...
- Python中常见的字符串小笔试题
1.获取实现两个字符串中最大的公共子串 思路: 1.比较两个字符串的长度 2.获取较短字符串的所有子串 3.使用__contains__函数进行比较 4.把子串当做键,子串长度作为值,存入字典, ...
- PHP 函数引用传值
<?php /* * @1 $arr = array_fill(1,100,'bbb'); echo memory_get_usage()."<br>"; fun ...
- Android设计和开发系列第二篇:Navigation Drawer(Design)
Navigation Drawer Creating a Navigation Drawer The navigation drawer is a panel that transitions in ...
- 【软件分析与挖掘】ELBlocker: Predicting blocking bugs with ensemble imbalance learning
摘要: 提出一种方法——ELBlocker,用于自动检测出Blocking Bugs(prevent other bugs from being fixed). 难度在于这些Blocking Bugs仅 ...
- javascript的fn方法(转)
jQuery为开发插件提拱了两个方法,分别是: jQuery.fn.extend(object); jQuery.extend(object); jQuery.extend(object); 为扩展j ...
- key是数字的对象集合
整理如下: let data = {3: '影视', 4: '音乐', 5: '广场舞', 6: '游戏', 7: '综艺', 8: '动漫', 9: '翻唱', 10: '生活', 11: '美食' ...
- LeetCode 50 Pow(x, n) (实现幂运算)
题目链接:https://leetcode.com/problems/powx-n/?tab=Description Problem:实现幂运算即 pow(x,n) 设形式为pow(x,n) ...
- 查看JVM使用的默认的垃圾收集器
一.查看步骤 cmd执行命令: java -XX:+PrintCommandLineFlags -version 输出如下(举例): 针对上述的-XX:UseParallelGC,这边我们引用< ...
- [SharePoint 2010] SharePoint 2010 FBA 配置以及自定义首页
https://blogs.msdn.microsoft.com/kaevans/2010/07/09/sql-server-provider-for-claims-based-authenticat ...