i got this error while i builde my project - android

Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller
than version 16 declared in library
[com.google.firebase:firebase-iid:20.0.2]
C:\Users\bushi.gradle\caches\transforms-2\files-2.1\946a39d7756c6b05aa38a853bdffc128\firebase-iid-20.0.2\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.google.firebase.iid" to force usage (may
lead to runtime failures)

Change minSdkVersion 15 in your build.gradle file to minSdkVersion 16.
The libraries you are referencing require a later version of Android.
You can find the build.gradle file under Gradle Scripts in Android Studio. The change you want to make is in the (Module: app) build file.

Related

How to reduce my minSdkVersion on my module?

I developed a networking module for my company. The initial defaultConfigs we set defined minSdk as 29 and it was with these settings that version 1.0.0 of this module was published. Now the need arose to reduce this value to 26 or even less, if possible. I already changed the minSdkVersion to 26 in the module and published a new version, but I always get the same error:
Manifest merger failed : uses-sdk:minSdkVersion 26 cannot be smaller than version 29 declared in library [nearsea-technologies:android.network:1.0.1] (...)/.gradle/caches/transforms-3/c729ae7e60a0cde9500d48b107ed3b46/transformed/android.network-1.0.1/AndroidManifest.xml as the library might be using APIs not available in 26
Suggestion: use a compatible library with a minSdk of at most 26,
or increase this project's minSdk version to at least 29,
or use tools:overrideLibrary="nst.android.network" to force usage (may lead to runtime failures)
This is the defaultConfig of my module and my current project is the same.
defaultConfig {
minSdk = 26
targetSdk = 33
(...)
}
How can I resolve this? What do I need to do? What am I missing?
If you need more code, I can make it available.
In AndroidManifext.xml for your module just add line:
<uses-sdk tools:overrideLibrary="nst.android.network" />

Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library

I am using instamojo payment library in my project version 3.4.0
compile 'com.instamojo:android-sdk:3.4.0'
when i change min Sdk version from 21 to 19, it is showing me following error
things i have done
change minSdkVersion 19 (in build.gradle app),
then sync,
then sync all project gradle files,
rebuilt project
invalid caches and restart
Any help will be valuable
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [com.instamojo:android-sdk:3.4.0] C:\Users\Rushabh.gradle\caches\transforms-2\files-2.1\811256b860a0ca6a3de017f237334983\jetified-android-sdk-3.4.0\AndroidManifest.xml as the library might be using APIs not available in 19
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.instamojo.android" to force usage (may lead to runtime failures)
as per the error the library is to minSDK 21 , so you have to use that as minSDK ,as for the particular librays docs please go through in detail , as per build file from github it can be seen minSDK is set as 21.
see here in github of this build file from the library
This is confusing because there are 2 places where you can set the MinSDK. You can set it in the build.gradle file. (which is probably where you looking) and then also you forgot that it is set in "projects structure" screen. Go to the left in android studio and right click on your project and go down to "open module settings F4" in that screen under modules you can set the MinSDK. Make sure that and your build.gradle are the same.
Thank you #0ldMaid! Once I added the same version in both file paths the error went away.
uses-sdk android:minSdkVersion="21"
C:\Users\YourName\source\repos\MauiApp1\Platforms\Android\AndroidManifest.xml
C:\Users\YourName\source\repos\MauiApp1\obj\Debug\net6.0-android\AndroidManifest.xml

Android, Is it possible to use on old release version of Google Admobs dependency release?

When I try to create Google Admob banner on my project, I receive an error like this below. I want to ask that, is there a solution without changing the minSDKVersion from 14 to 17? Maybe using an old release version of google ads dependency implementation on build.gradle file? If yes, is there any drawback doing this?
Thanks..
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.google.android.gms:play-services-ads:19.1.0] C:\Users\SAMSUNG\.gradle\caches\transforms-2\files-2.1\3f183cf0518755adc969c4fb4eee168a\jetified-play-services-ads-19.1.0\AndroidManifest.xml as the library might be using APIs not available in 14
Suggestion: use a compatible library with a minSdk of at most 14,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.google.android.gms.ads.impl" to force usage (may lead to runtime failures)

what is the new version of styleabletoast

Manifest merger failed :
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.muddzdev:styleabletoast:2.1.2] C:\Users\java\.gradle\caches\transforms-1\files-1.1\styleabletoast-2.1.2.aar\9c4fc146927a85bf2fdc6fca1c3fb32a\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.muddzdev.styleabletoastlibrary" to force usage (may lead to runtime failures)
Suggestion: use a compatible library with a minSdk of at most 15
It's pretty clear what you should do.
Library supports minsdk >= 16 only so, change your minsdk to upper than 16 or equal.
Also, if you're looking for new version of a library, search the library name and version like this: com.muddzdev:styleabletoast:2.1.2 then you'll see results which includes library's github page and maybe more. So, they should be providing the latest versions on their github page but if you still couldn't see it, look for where the author of library uploaded. for e.x: maven, jcenter or whatever then you'll be able to see the latest version on the library's page.
You can find all available versions here:
https://mvnrepository.com/artifact/com.muddzdev/styleabletoast

Android Studio API level error for Android Wear

I am trying to run and test a simple android application using android studio(version 3.0.1) on a smartwatch, I am getting the below error with respect to the gradle sync. (I am creating an new project by selecting the wear with the API level of 22 which is same as smartwatch API level).
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 22 cannot be smaller than version 23 declared in library [com.android.support:wear:26.1.0] C:\Users\Sai.gradle\caches\transforms-1\files-1.1\wear-26.1.0.aar\5b2a40104c2cc0843c9e44597771b49a\AndroidManifest.xml as the library might be using APIs not available in 22
Suggestion: use a compatible library with a minSdk of at most 22,
or increase this project's minSdk version to at least 23,
or use tools:overrideLibrary="android.support.wear" to force usage (may lead to runtime failures)
I have looked up for this error in most of the stackoverflow post's and they suggested to change the minimum SDK version in the build.GRADLE (app module) file in the defaultConfig section to 23, and the error doesn’t appear when I change the version to 23 as below.
defaultConfig {
applicationId "com.example.sai.wearexample"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
But, if I change the minSdkVersion version to 23 then there is the below error while I want to run the application on the smartwatch.
I have looked into many of the answers in the stackoverflow but I am not able to get any of the specific resolutions for this question. I am stuck in between these two errors, any help would be appreciated.
You should not use com.android.support:wear for api <23.
For the views you can add:
provided 'com.google.android.wearable:wearable:2.3.0'
compile 'com.google.android.support:wearable:2.3.0'
And change in your java and xml the code for use the tools of
com.google.android.wearable
instead
com.google.android.support:wearable
For example, use android.support.wearable.view.BoxInsetLayout instead of android.support.wear.widget.BoxInsetLayout.
I hope I have helped.

Categories

Resources