Ошибка Manifest merger failed после добавления зависимости com.appodeal.ads.sdk:core:2.10.0
Добавил в build.gradle(app) строку implementation 'com.appodeal.ads:sdk:2.10.1.+' в dependencies для подключения рекламы через Appodeal.
Сейчас при запуске проекта выходит ошибка Manifest merger failed with multiple errors, see logs.
А в Merged manifest ошибка:
"Merging Errors: Error: Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:32:13-72 is also present at AndroidManifest.xml:69:13-58 value=(@style/FirebaseUI.Translucent). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:29:9-32:75 to override. app main manifest (this file), line 31".
Сама ошибка предлагает " add 'tools:replace="android:theme"' to element at AndroidManifest.xml:29:9-32:75 to override. app main".
Когда я делаю это, вместо этой ошибки в Merged manifest появляются две другие:
Merging Errors: Error: tools:replace specified at line:28 for attribute android:theme, but no new value specified app main manifest (this file), line 27
Error: Validation failed, exiting app main manifest (this file)
Код Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="space.zelinskiy.quiz"
android:versionCode="2"
android:versionName="2.0"
tools:ignore="LockedOrientationActivity">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<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/Theme.AppCompat.Light.NoActionBar"
android:networkSecurityConfig="@xml/network_security_config">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/application_app_id" />
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".GameLevels"
android:screenOrientation="portrait">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".OptionHelp"
android:screenOrientation="portrait">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Level5"
android:screenOrientation="portrait">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".FinishWin"
android:screenOrientation="portrait">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".userlist"
android:screenOrientation="portrait">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id"/>
</application>
</manifest>
Код build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "space.zelinskiy.quiz"
minSdkVersion 23
targetSdkVersion 29
versionCode 5
versionName "2.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-firestore:21.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.android.play:core:1.10.0'
implementation 'com.google.android.material:material:1.2.0'
implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-database:19.3.0'
implementation 'com.android.support:design'
implementation 'com.android.support:cardview-v7'
implementation 'com.android.support:recyclerview-v7'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.firebaseui:firebase-ui:0.6.2'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.appodeal.ads.sdk:core:2.10.0'
implementation 'com.appodeal.ads.sdk.networks:admob:2.10.0.11'
implementation 'com.appodeal.ads:sdk:2.10.1+'
}
apply plugin: 'com.google.gms.google-services'
Код build.gradle(модуль)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:4.3.8'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven{
url 'https://maven.google.com'
}
maven {
url "https://artifactory.appodeal.com/appodeal"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}