Error:more than one library with package name
来源:互联网 发布:数据分布图怎么做spss 编辑:程序博客网 时间:2024/06/05 16:00
转载请标明出处:http://blog.csdn.net/xx326664162/article/details/50160573 文章出自:薛瑄的博客
你也可以查看我的其他同类文章,也会让你有一定的收货!
错误信息:
Error:more than one library with package name “com.example.xx.testlib”
示例:
ZXing project 下的 core module和android module中,AndroidManifest.xml中的package如下:
package="com.example.xx.test"
包名即相对路径\com\example\xx\test
解决方法:
遇到上面的错误,可能不好发现到底是哪几个lib使用了相同的包名
可以在工程的文件夹目录中搜索testlib,即搜索testlib文件夹,查看到底是哪几个lib module使用了相同的包名,再进行相应的修改,
我出现的问题,在这core module和android module中出现了相同的包名,即相对路径 \com\example\xx\test
\ZXing\core\build\generated\source\buildConfig\release\com\example\xx\test
\ZXing\android\build\generated\source\buildConfig\release\com\example\xx\test
build文件夹中的包名修改
build\generated\source\buildConfig\release\com\example\xx\test中的类BuildConfigde 包名并不能通过这样的修改进行改变,需要修改AndroidManifest.xml中的package去改变,因为在编译的时候才会生成build文件夹。
src->main->java 文件夹中的包名修改,参考这里
有同学可能会有疑问,可否通过 build.gradle 文件中的applicationId 指定包名,可以查看这篇文章
疑问:我修改了AndroidManifest.xml中的package,并没有与src->main->java 文件夹中的包名一致,
R类资源是根据AndroidManifest.xml的包名去生成,上述两个包名不一致,应该是访问不到src中的资源啊
但是程序为什么还能正确运行???难道是AndroidManifest.xml中的package只是去生成R类??不管包名是什么都能访问资源???
参考:http://jingyan.baidu.com/article/d169e1864f9553436611d8e2.html
http://www.bubuko.com/infodetail-819612.html
- Error:more than one library with package name
- Grade 编译 Android 解决 Error:more than one library with package name
- Android studio more than one library with package name 'xxx.xxx.mylibrary'
- error: more than one device and emulator
- error: more than one device and emulator .
- error: more than one device and emulator
- error: more than one device and emulator
- error: more than one device and emulator .
- error: more than one device/emulator
- Adb error: more than one device/emulator
- ADB error: more than one device/emulator
- Flex中TypeError: Error #1089: Assignment to lists with more than one item is not supported.
- Error:Error: Found item Attr/duration more than one time
- more than one row with the given identifier was found
- More than one file was found with OS independent path
- 'block' tag with name 'content' appears more than once
- ERROR: Running more than one instance of Hudson
- error: src refspec XXX matches more than one
- socket通信
- Android GC 那点事
- Moodle 平台中如何批量设置选择题选项 随机排列
- 微信应用放在tomcat上正常,放到weblogic上回调失败
- Android PullToRefresh (ListView GridView 下拉刷新) 使用详解
- Error:more than one library with package name
- HDU 2686 Matrix 最小费用最大流
- Thread中yield
- 直线交点
- maven打war包加入第三方依赖包
- 在iOS和OSX双平台上的字符串格式化
- struts2 配置文件详解
- 暴力水题(思路很重要)HDU5583
- Android中Animation 详细解读