I just imported an Android project(which was written in Eclipse) to Android Studio. At first, I had some problems so I deleted some dependencies and later when I reimported the project to Android Studio
I had to include the dependencies which I earlier deleted. I tried to run the app and I got the following messages.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute activity#com.google.android.gms.ads.AdActivity#configChanges value=(keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|locale) from AndroidManifest.xml
is also present at [com.google.android.gms:play-services-ads-lite:9.4.0] AndroidManifest.xml value=(keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize).
Suggestion: add 'tools:replace="android:configChanges"' to <activity> element at AndroidManifest.xml to override.
Error:orientation|screenLayout|uiMode|screenSize|smallestScreenSize)
Error:orientation|screenLayout|uiMode|screenSize|smallestScreenSize|locale) from AndroidManifest.xml
What am I doing wrong?
Related
After updating to Android Gradle Plugin 7.3.1 Android Studio says that package is deprecated in AndroidManifest.xml and I need to use namespace param in build.gradle.kts. I removed the package attribute in all my android manifests (I'm using additional manifest files for debug and release builds) and have done this:
build.gradle.kts
android {
...
applicationId = "org.sample.appid"
...
namespace = "org.sample.packageid"
...
}
After this I can not build the project because of the error:
D:\Desktop\Sample\app\src\debug\AndroidManifest.xml:4:5
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : Attribute manifest#package value=(org.sample.packageid) from AndroidManifest.xml:4:5-35
is also present at AndroidManifest.xml:2:1-102:12 value=(org.sample.appid).
Attributes of <manifest> elements are not merged.
Debug manifest can not be merged with the main manifest, but why package name is mixed with applicationId while merging? Is there anything that must be additionally configured? Or there's a bug with AGP 7.3.1?
The error message even precisely tells where the problem lies.
... also remove package from src\debug\AndroidManifest.xml.
The problem was really complex - I missed removing the package attribute in one AndroidManifest.xml. Also, Android Studio must be restarted after that with a full cache clear (without this it will not work). After that everything works as expected.
I am trying to build my project on android studio but I get this errors:
Execution failed for task ':launcher:mergeDebugJavaResource'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'META-INF/facebook-core_release.kotlin_module'.
java.lang.RuntimeException: Manifest merger failed
Manifest merger failed
Duplicate class found
I also get a lot of erros on my AndroidManifest.xml that look like this one.
Class referenced in the manifest, com.facebook.unity.FBUnityDialogsActivity, was not found in the project or the libraries
Unresolved class 'FBUnityDialogsActivity'
I have tried all the solutions I could find on the internet and I also tried the suggestions android studio makes but none of them worked. The project is made with unity and I am just using android stuidio build the APK. Also some of the errors only occur after I implement Facebook SDK into my project.
When I am running the command react-native run-android in the terminal
(React-Native), I am getting the below-mentioned error.
Manifest merger failed : Attribute application#appComponentFactory
value=(andr
oid.support.v4.app.CoreComponentFactory) from
[com.android.support:support-compa
t:28.0.0] AndroidManifest.xml:22:18-91 is also present at
[androidx.core:core:1.1.0-alpha05] AndroidManifest.xm
l:22:18-86 value=(androidx.core.app.CoreComponentFactory).
I tried migrating from android.support to android x as per the solution stated by few.
Expected Result: Build SuccessFul
Actual Result: BUILD FAILED in 9s
Can you try adding below in gradle.properties:
android.useAndroidX=true
android.enableJetifier=true
It will automatically resolve dependency conflicts between google's files and third-party dependencies.
see Manifest merger failed after import a module if this option doesnt work rather than upgrading to android X now.
I'm following the examples on this sample from github but when i add the dependency I recieve the error
"
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application#theme value=(#style/AppTheme) from AndroidManifest.xml:20:9-40
is also present at [com.github.boxme:squarecamera:1.0.3] AndroidManifest.xml:11:18-76 value=(#style/squarecamera__CameraFullScreenTheme).
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:16:5-81:19 to override."
I gather it's because im using this "compile 'com.android.support:appcompat-v7:22.2.1'" which is an older version and is conflicting with the theme from the added dependency.
however I want to avoid changing appcompat to a newer version because every activity i have relies on 22.2.1 and the change would be too great.
Are there any ways of working around this error? Or should i just look into another way of creating a square image from camera activity?
My android app is using BaseGameUtils and every time I start Android Studio I get the following error:
Error:Execution failed for task ':BaseGameUtils:processDebugAndroidTestManifest'.
java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7 declared in library [com.android.support:appcompat-v7:20.0.0] F:\Programowo\androidapps\FixMath\BaseGameUtils\build\intermediates\exploded-aar\com.android.support\appcompat-v7\20.0.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
I'm getting this error only once on startup Android Studio.
That's how look my project structure
app project structure
I just add this line in BaseGameUtils AndroidManifest.xml
<uses-sdk android:minSdkVersion="14" />
Just add this line
<uses-sdk tools:overrideLibrary="com.google.android.gms.all"/>
on your app --> manifest --> AndroidManifest.xml file
That error means that the imported library com.android.support:appcompat-v7:20.0.0 has a minSdkVersion specified as 7 whereas you seem to be targeting lower versions