我添加了一個遠程Maven回購我的Android庫項目,在我的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
}
}
}
現在它給了我一個清單合併錯誤指出我的圖書館包名稱與遠程回購的名稱有衝突。
Execution failed for task :spuul:processDebugTestManifest.
> java.lang.RuntimeException: Manifest merger failed :
Attribute instrumentation#[email protected]
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
不知道該怎麼做才能解決這個問題。有沒有什麼辦法可以跳過創建測試版本? 謝謝。
如@rydnr所說,它是「xmlns:tools」而不是「:android」友好編輯 – amIT 2015-05-22 11:08:29