【发布时间】:2014-10-28 10:52:03
【问题描述】:
我已在我的 android 库项目中添加了一个远程 maven 存储库,并在我的 build.gradle 中进行了以下更改:
apply plugin: android-library
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath com.android.tools.build:gradle:+
}
}
apply plugin: maven
repositories {
mavenCentral()
maven {
url https://mvn.xxx.com/content/repositories/releases/
credentials {
username xxxxxx
password yyyyyy
}
}
}
现在它给了我一个明显的合并错误,说明 我的库包名称与远程 repo 的名称冲突。
Execution failed for task :spuul:processDebugTestManifest.
> java.lang.RuntimeException: Manifest merger failed :
Attribute instrumentation#android.test.InstrumentationTestRunner@targetPackage
value=(com.myLibrary.core.test) from manifestMerge1961318094990565159.xml:12:22
is also present at com.remote.mavenrepo:1.0_7.64:16:9 value=(com.remote.mavenrepo)
Suggestion: add 'tools:replace="android:targetPackage"' to <instrumentation>
element at manifestMerge1961318094990565159.xml:11:5 to override
不确定如何解决此问题。有没有办法跳过创建测试版本? 谢谢。
【问题讨论】:
标签: android-studio android-gradle-plugin android-library android-build