I've got a little problem with my project.
Few months ago everything was ok (project can be compile and run without any problems). Ater that when i try to compile it (without any changes - only android studio updates), below errors show me up:
E:\Android\Android\android studio projects\Sklepik\app\src\main\AndroidManifest.xml
Error:(8, 5) uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library E:\Android\Android\android studio projects\Sklepik\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\10.2.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library E:\Android\Android\android studio projects\Sklepik\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\10.2.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage
My manifest looks like:
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17"
/>
and gradle
defaultConfig {
applicationId "****"
minSdkVersion 9
targetSdkVersion 17
}
Even when i change in both setcion minSdk to 14 or add overrideLibrary nothing happens.
How to solve it?
You are using play services with version 10.2.0 that works on higher SDK version (min 14). You can either set 14 as min SDK version in your app or choose a lower play services version that is compatible with skd version 9.
Related
While integrating react-native-hms-site sdk in the Android studio, build failed due to below error
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:react-native-hms-site]
library might be using APIs not available in 16.
Change minSdkVersion to 19 in the project build.gradle file
"minSdkVersion = 19"
after upgrading Android Studio to version 3.4 my project sync reports an error:
ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library [androidx.legacy:legacy-support-v4:1.0.0] C:\Users\pecana\.gradle\caches\transforms-2\files-2.1\0b6817155f227f1df719b12aa7dc1519\AndroidManifest.xml as the library might be using APIs not available in 1
Suggestion: use a compatible library with a minSdk of at most 1,
or increase this project's minSdk version to at least 14,
or use tools:overrideLibrary="androidx.legacy.v4" to force usage (may lead to runtime failures)
I can by the way build the APK and run the application correctly (but only without instant run active). I tried to add the
<uses-sdk tools:overrideLibrary="androidx.legacy.v4"/>
to the main AndroidManifest.xml but the error still occurs.
Any idea on how to fix this ?
Thank you
As the error suggested you can also increase your project's minSdk version to 14 or above.
Go to your build.gradle(Module app) file and add the minimum SDK version like this:
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14 or above here
}
}
I am trying to create a Tinder-style swipe left/swipe right feature. But when I added the dependencies into my code I got this manifest error:
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.mindorks:placeholderview:0.7.1] /Users/cassandracampbell/.gradle/caches/transforms-1/files-1.1/placeholderview-0.7.1.aar/e4aa1d0fe45df90e4bd68b2aac33a24e/AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.mindorks.placeholderview" to force usage (may lead to runtime failures)
How can I fix this?
You are using this library com.mindorks:placeholderview:0.7.1 whose minimum sdk is 16. So in order to use this library your minimum sdk should also be 16. Just change the minimum sdk in your gradle to 16 and it will work.
According to error message:
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.mindorks:placeholderview:0.7.1]
You need to change your minSdkVersion 14 to 16 in your app/build.gradle . I.e.
defaultConfig {
...
minSdkVersion 16
...
}
On my current Android app, the minimum SDK version is 19. I use a library lets call it as "XYZ.jar".
The minimum compatible version of library is also 19. It works perfectly fine.
Now I have a requirement that my app should support Android 4.1.1 which is of sdkversion 16.
When I changed the minimum SDK version in the app to 16 and when I build it, I get the following error.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [XXX_Android_v2.0:XXXLibrary:unspecified] XXPATHXX\app\build\intermediates\exploded-aar\XXX_Android_v2.0\XXXLibrary\unspecified\AndroidManifest.xml]
Suggestion: use tools:overrideLibrary="com.xxx.xxx.api3" to force usage
I have one more library lets call it as "ABC" which has an miniumum sdk version 14. So what i need to acheive is when the sdkversion is less than 19
use library ABC and when the sdk version is more than 19 use the liberabry XYZ. How do i acheive this while building my project ?
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