Targeting S+ (version 31 and above) error on Android - android

I try to upgrade com.google.android.gms:play-services-ads library to 20.0.0 from 19.0.0. and I'm getting this error:
Targeting S+ Error
App versions:
my app versions
Gradlle: 4.2.2
Kotlin: 1.6.10
I tried to upgrade other libraries which use same library to avoid class dubliced but now throwed it.
I tried some solutions but didn't work for me

Related

Shall I downgrade the installed version of Kotlin plugin in Android Studio?

I am getting a warning as I build an Android Kotlin w/ Jetpack compose app with Android Studio like this:
Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
.../transformed/jetified-kotlin-stdlib-jdk8-1.5.31.jar (version 1.5)
.../transformed/jetified-kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
.../transformed/jetified-kotlin-stdlib-1.6.10.jar (version 1.6)
.../transformed/jetified-kotlin-stdlib-common-1.6.10.jar (version 1.6)
The Kotlin version I am using with my project is 1.5.31, since It is compatible with Compose compile version 1.0.5.
The Kotlin plugin version installed on Android Studio is 1.6.10
Just for reference I am using Android Studio Bumblebee | 2021.1.1 Patch 1.
Shall I downgrade the plugin Kotlin version on Android Studio from 1.6.10 to 1.5.31?
Or, just ignore the warning? Other solution?
This have nothing to do with the plugin version you have installed. Probably some dependency of yours have kotlin 1.6.10 dependency and that's why you hvae this conflict. Try to find out which one using dependency tree - my recommendation is to use gradle scan, you can read about it here. In gradle scan results you can go through all of your dependencies in a tree, like here. You have to find which library is using newer kotlin and then use older version of that library that's targeting your kotlin version

Targeting Mvvmcross 6.0 for MonoDroid v8.0

I'm trying to create a Android project with MvvmCross.
But I'm trying to target MonoDroid 8.0 which is API-26 Android Oreo 8.0. Cause my test device is this and cannot be upgraded to 8.1.
But when trying to install any Mvvmcross.Droid package I get a
Package MvvmCross.Droid.Support.Design 6.0.1 is not compatible with
monoandroid80 (MonoAndroid,Version=v8.0)
Does that mean if I'm trying to target any older version other than 8.1 I cannot use Mvvmcross 6.0 and have to use older versions of Mvvmcross?
If anybody else if facing a similar problem.
Note : MVVMCross 6 targets minimum MonoDroid 8.1 which is API 27 and you need to install them in order for the app to compile and run on any versions of Android.
So solved this by installing the API 27 sdk and making sure the Target Version is set to API 27 or 8.1 version.

SDK Platform Tools release

Although all my libraries are up-to-date, the version of SDK platform tools is a problem because it remains lower than the current version (Android SDK Platform-Tools is 26.0.2, Build is 27.0.1). So from my build.gradle, I have :
implementation 'com.android.support:support-v4:27.0.1'
that shows an error
Found versions 27.0.1, 26.0.1, 25.2.0 . Example include com.android.support..."
even with many invalidate cache and restarts.
So my question is: should I downgrade my targetSDKversion to 26 or maybe 25, or can I run my project with this error message? I use AS 3.1 Canary 4.

How do I install Android SDK Platform-Tools 24.0.0?

I'm following the guide for setting up the Android N Preview https://developer.android.com/preview/setup-sdk.html
In "Update or Create a Project" Google says I need to have 24.0.0 platform tools.
Just be sure that you've updated your project to use Android SDK Build
Tools 24.0.0 and Android SDK Platform-Tools 24.0.0.
I have installed the new SDK Platform: Android 6.X (N), API Level 24, Revision 1. However when I open SDK Tools the only Android SDK Platform-Tools version is 23.1.
I have updated my build.gradle for Android 24 and for Jack and Java 8 (see).
Everything works great on Android 24 simulator but crashes on a device or simulator running Android 22/23 (less than 24) with the following error:
java.lang.NoSuchMethodError: No virtual method
stream()Ljava/util/stream/Stream; in class Ljava/util/ArrayList; or
its super classes (declaration of 'java.util.ArrayList' appears in
/system/framework/core-libart.jar)
I suspect the cause is having SDK Platform-Tools version 23.1.0 instead of 24.0.0 but if there is another solution i'd be happy to hear it.
Edit
Installing platform tools 24.0.0 rc1 did not fix the crash.
I'm not sure what else to try given that I have followed all the instructions to setup the preview and the Jack compiler.
but crashes on a device or simulator running Android 22/23 (less than 24) with the following error
java.util.stream.Stream was added in API Level 24. This class cannot be used on older devices.
Certain Java 8 features, like lambda expressions, may work on older devices, but not classes that were introduced in Android N.
Just select the show package details and then you can find all the versions. Refer to the attached image
Asuming you have Android Studio 2.1
Launch the standalone SDK manager.
From there Android N API 24 should be available to install
Your API level 24 app runs OK with Android 24 (virtual) device but doesn't work with pre-24 device - so everything is exactly as one would expect.

How to downgrade project sdk from 23 to 21 in android studio 1.4.1 without getting error?

I just started install android studio this year and i get a default sdk of 23 everytime i open my project. However, i would like to downgrade it to sdk 21. But i have been getting error from other java file. How should i solve this matter? I have been following from this tutorial "Changing API level Android Studio". However after gradle sync, the error come out

Categories

Resources