':app:processDebugManifest' error while importing project - android

I am trying to import an Android sample project then i get this message error:
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.0] C:\Users\HP.android\build-cache\084ac0ca1bed4f5e30644d43f2b1fe5758c0d427\output\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage

You need to change min sdk to 14 in build.gradle file of app module.

Basically, libraries have their own minSdkVersion. When you add a library in your project, which here is gms.play_services, for example, uses 14 as minSdkVersion, and in the meantime, you are using 10 in your own project, this error will appear while you're trying to sync your project. SO:
Or you have to raise your projects minSdkVersion to 14.
Or you can add tools:overrideLibrary in your manifest like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-sdk
tools:overrideLibrary="com.google.android.gms.play_services"/>
</manifest>

Related

error when i import android eclipse project in Android Studio

Hello guys i'm gald to be here, please i have that error, can you help me?
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:10.2.1] C:\Users\Khalil\StudioProjects\Android eBook Template\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\10.2.1\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage
what i can do?
In your Manifest.xml file, update uses-sdk to version 14.
First Remove the google play library(in this case com.google.android.gms.play_services), then open manifests --> AndroidManifest.xml
and change min sdk version to 14
This Line:- android:minSdkVersion="14"
Also Change it in your build.gradle of app..
under the defaultConfig
Hope it helps!!

Wikitude: uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [:wikitudesdk:]

I'm trying to build a cordova android app with wikitude plugin. When I build the project using cordova build, I got an error:
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [:wikitudesdk:]. I tried several answers here: Manifest merger failed : uses-sdk:minSdkVersion 14, but they didn't solve my problem.
Currently, my portion of build.gradle looks like:
dependencies {
// do not use dynamic updating.
compile 'com.android.support:appcompat-v7:20.+'
}
and I changed my AndroidManifest.xml to force the minsdkversion set to be 15:
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="23" />
anybody has ideas to solve this?
Sorry, my bad, I shouldn't change the:
~\<Project>\platforms\android\build\intermediates\exploded-aar\wikitudesdk\AndroidManifest.xml.
Instead, I just changed the version in ~\<Project>\platforms\android\AndroidManifest.xml and it works. Also, there's no need to change the dependencies in build.gradle if you are using the latest version. It should be a quick and easy fix.

I'm getting error: ":BaseGameUtils:processDebugAndroidTestManifest" on Android Studio startup only

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

error import android eclipse project in Android Studio

Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [com.google.android.gms:play-services:8.4.0] C:\Users\admin\Desktop\RingtoneApp2\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.4.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.all" to force usage
I used the site
http://developer.android.com/sdk/installing/migrate.html
You have a library (Play Services) that declares its minSdkVersion to be 9 but your application declares it to be 8. Since the library won't work on API 8, this combination is invalid. Eclipse didn't check for this but Android Studio does.
First Remove the google play library(in this case com.google.android.gms.play_services), then open manifests --> AndroidManifest.xml and change min sdk version to 9
This Line: android:minSdkVersion="9"
Also Change it in your build.gradle of app.. under the defaultConfig

UI Automator in project with minSdkVersion 9

im trying to use UI Automator in my project with minSdkVersion 9 and of course it not work because it target API 18.
So Android Studio throws me this error:
Error:(5, 5) uses-sdk:minSdkVersion 9 cannot be smaller than version 18 declared in library ~/app/build/intermediates/exploded-aar/com.android.support.test.uiautomator/uiautomator-v18/2.1.1/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.test.uiautomator.v18" to force usage
Error:Execution failed for task ':app:processDebugAndroidTestManifest'.
> java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 18 declared in library ~/app/build/intermediates/exploded-aar/com.android.support.test.uiautomator/uiautomator-v18/2.1.1/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.test.uiautomator.v18" to force usage
I added to my Manifest the tag <uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18" /> but the error keep showing, i am doing something wrong?
If you use gradle you can add another Manifest to the androidTest build type which will get merged and does not affect your normal release / debug builds.
Add app/src/androidTest/AndroidManifest.xml to your project:
<manifest
package="${applicationId}.test"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
</manifest>
This will merge the manifest with your normal one, not requiring to change your minSdk. PLease note, that this will probably crash if you try running UI Instrumentation Tests on sdk < 18.
By adding additional permissions to the debug/AndroidManifest you can also just add permissions for your tests like external storage if you don't regularly need them in your app. They will although be also available to your debug builds.
This worked for me
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="${applicationId}.test">
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator" />
You need to build your app with minSdkVersion 18, however you can still switch to espresso.

Categories

Resources