Я получаю эту ошибку в своем коде, когда пытаюсь реализовать плагин под названием Helpshift.
Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from AndroidManifest.xml:16:13-35 is also present at [com.android.support:design:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add 'tools:replace = "android:value"' to element at AndroidManifest.xml:14:9-16:38 to override.
Я думаю, это как-то связано с версиями приложения. Вот мой файл манифеста:
<?xml version = "1.0" encoding = "UTF-8"?> <manifest xmlns:android = "http://schemas.android.com/apk/res/android" package = "com.example.leoconnelly.connexus">
<uses-sdk android:minSdkVersion = "14" android:targetSdkVersion = "26" android:compileSDKVersion = "26" android:buildToolsVersion = "26" />
<application android:allowBackup = "true" android:icon = "@mipmap/ic_launcher" android:label = "@string/app_name" android:roundIcon = "@mipmap/ic_launcher_round" android:supportsRtl = "true" android:theme = "@style/AppTheme">
<activity android:name = ".MainActivity">
<intent-filter>
<action android:name = "android.intent.action.MAIN" />
<category android:name = "android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name = ".HealthCenterListActivity" />
<activity android:name = ".HealthCenterSelectedActivity" />
<activity android:name = ".MoreInfoActivity" />
<meta-data
android:name = "android.support.VERSION"
android:value = "26.0.1" />
</application>
и вот мой build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "com.example.leoconnelly.connexus"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
//Helpshift
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.helpshift:android-helpshift-en-aar:6.4.2'
}
Я полагаю, что делаю что-то не так с версиями, но когда я их меняю, я получаю совершенно другую ошибку. Любая помощь прилагается.
удалите эту строку в файле манифеста:
<uses-sdk android:minSdkVersion = "14" android:targetSdkVersion = "26" android:compileSDKVersion = "26" android:buildToolsVersion = "26" />
и в вашем build.gradle добавьте эту строку в раздел defaultConfig:
buildToolsVersion '26.1.0'
сделай то, что @prem сказал выше
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
Вместо этого
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
В случае, если библиотека поддержки является жесткой зависимостью в Helpshift sdk, вы можете исключить ее и использовать выбранную версию библиотеки поддержки примерно так:
//Helpshift
// use version 26.1.0 instead of 26.0.2
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
// exclude the support library
implementation ('com.helpshift:android-helpshift-en-aar:6.4.2') {
exclude group: 'com.android.support'
exclude module: 'design'
exclude module: 'recyclerview'
exclude module: 'cardview-v7'
}