what is the new version of styleabletoast - android

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

Related

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)

Androidx min sdk

What is androidx min sdk? I just migrated to androidx and i need to support minsdk 14. But my build fails indicating that androidx.browser:browser:1.0.0 has minsdk 15.
I can't find it in release notes or anywhere else
androidx.browser:browser:1.0.0 requires the minSdk = 15 (see) in order to function properly, so generally theres no way to support minSdk = 14 while still using androidx.browser:browser:1.0.0.
So basically you have these options:
a. Set minSdkVersion to 15 in app level build.gradle file(and stop supporting minSdkVersion 14)
However if u 'must' have to support minSdkVersion 14 :
b. You can add this line in AndroidManifest.xml file just before application tag:
<uses-sdk tools:overrideLibrary="androidx.browser"/>
this will ensure the project will run properly in most cases but it might lead to run time crashes in few occasions.If you are not really using some feature of the class that absolutely requires sdkVersion 15 then u might just get lucky.
c. Look for alternative classes that can do similar behaviour with minSdkVersion 14 (this might be extremely unlikely)
d. You can consider reverting back to android support libraries instead of androidx. Since, android support libraries will continue to stay around in the google's maven repo for a while.
As stated here:
Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14) for most library packages.
AndroidX has started with the support library for API Level 28, so minSdk 14 will be the requirement.
For your artifact, the current stable version requires minSdk 15 and the current latest alpha release (1.2.0-alpha09) requires minSdk 16.
AndroidX browser is afaik a replacement / androidX version of Chrome Custom Tabs which had required minSdk 16, maybe this explains the sdk requirement.
By the way you can find the release notes here.

Can I use Widgets from support library of Android L Preview in current Android Version?

I am trying to use RecyclerView & CardView in existing Android version. They said it is in support library. So, I should be able to use those with put "compileSdkVersion" to "Android-L". Right ?
I am trying to use those widgets without Android L Preview device or emulator.I have checked other questions on this matter. But, seems they all are trying Android-L with Android-L version.
Here is my dependencies.
compile 'com.android.support:support-v4:13.0.+'
compile 'com.android.support:recyclerview-v7:+'
Here is my target config
minSdkVersion 15
targetSdkVersion 20
Thanks in advance for any idea.
I just found the solution.
The reason why I can't build the App with RecyclerView & CardView while the targetSdkVersion and minSdkVersion is not "Android-L" is because internally Google designed to treat the preview version of OS differently comparing with original releases.
When I compile the App which contains the components from Android-L, the build tools locked minSdkVersion and targetSdkVersion to same level. The new supports libraries (RecyclerView, CardView, Palette, etc) are also locked into the L API level.
This behaviour is only happening on this Android-L preview release.
The fix for it is to put the following in AndroidManifest.xml.I didn't need to change anything on my gradle script.
<uses-sdk
tools:node="replace" />
Since version 0.11 of Android Gradle Plugin, it turned on a new Manifest Merger by default. It allows us to do some niffy stuffs. This specific configuration tells the manifest processor to replace any attributes from uses-sdk nodes in lower-priority manifest (such as library manifest in this case) with this attributes.
Since Gradle also inserts minSdkVersion and targetSdkVersion from your build.gradle into this uses-sdk node, that's all we really need to add.
Check here for more information related to this issue.
Check here for the info related to Manifest Merger.
The best solution is RecyclerViewLib. The support library has been pulled into a repo and published on maven central. It'll be safe even after L is released as all L dependent code has been removed. The author explains it here in his blog post.
To use it in your project just add the following line in your build.gradle dependencies:
compile 'com.twotoasters.RecyclerViewLib:library:1.0.+#aar'
Good luck!
No you must set targetSdkVersion above 7. You can use android support library v7 with project that support android above 7 api level.
And one more. Android L has api level 'android-L', not 20. Under the hood it has api level 21 (20 is 4.4W, KitKat for wearables).

Set merge strategy on AndoridManifest when using gradle and library projects

I have a gradle project that uses a library with a minSdkVersion set to api level 11. My application has a minSdkVersion of 9. When compiling I get the following error.
Main manifest has <uses-sdk android:minSdkVersion='9'> but library uses minSdkVersion='11'
I have seen a similar question titled manifest-merging-failed-android-studio but the solution was to change the library to have the same minSdk version. If you dont have control over the library that isnt possible.
The library is only used in situations where the minSdkVersion is higher than 11 so actual use isnt an issue.
Is there anyway to get the advantages manifest merging and let the library have a higher minSdk than your main project?
Workarounds that I have thought of but havent found a way to do.
Set priority if manifests conflict
Ignore minsdk for library projects
Remove minSdk from arr before merging starts

Categories

Resources