How to fix when I started up the Android Studio and Generate the Emulator, but there is 6 errors - android-emulator

6 issues were found when checking AAR metadata:
Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.appcompat:appcompat:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.core:core:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
6 issues were found when checking AAR metadata:
Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.appcompat:appcompat:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.core:core:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

Edit 3: Just discovered a likely more safe and complete way to do this:
Changing Sdk Version using Android Studio menus
If using Mac, go to File -> Project Structure.
Under Modules, look for app, and then look for the tab labeled Properties. The first option, called Compile Sdk version, is the error. You want to change the compile Sdk version from 32 to 33.
Original Post:
I do! Just figured it out myself. See image below for visual guidance exact locations in Android Studio.
Partial Screenshot of what to update
In the directory, find Gradle Scripts, and in Gradle Scripts find "build.gradle (Module :app)".
Within that, change compileSdk from 32 to 33, and change targetSdk from 32 to 33. Look through build.gradle for anything else that might need updating number-wise.
Then click Sync Now at the top of the code editor.
I ran into this problem right away on the default "Hello World" app, so if you find it early it may be more helpful. I don't know how difficult it is to fix when something more complex has been put in place. I hope I help at least a little!
From,
A brand new student learning Android. :)

Related

Ionic Capacitor : Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE

I’m having this issue because of the minimum target SDK 31 update for the Play Store
I’ve had the App working well, I changed the TargetSDK in the gradle variables file and I’m getting this error :
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
Here’s the List of My Plugins :
(npx cap ls)
#capacitor-community/admob#3.2.0
#capacitor/app#1.1.1
#capacitor/haptics#1.1.4
#capacitor/keyboard#1.2.2
#capacitor/push-notifications#1.0.9
#capacitor/splash-screen#1.2.2
#capacitor/status-bar#1.0.8
#codetrix-studio/capacitor-google-auth#3.1.4
[info] Listing plugins for web is not possible.
I’ve read That I need to upgrade some plugins but i don’t know which ones
Can you please help me
To properly support SDK 31/32 you have to upgrade to capacitor 4.
Run npm i #capacitor/cli#latest. And then run npx cap migrate. That will update all capacitor dependencies and plugins to version 4 and make required changes to your native projects.

How to find what Flutter packages requre SDK version #33?

When trying to deploy my Flutter app, I'm getting an error that says that the deployment requires SDK version #33.
How can I find what packages in the app require SDK #33?
R
unning Gradle task 'assembleDebug'...
Warning: The plugin url_launcher_android requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to D:\Ian\Documents\github\good_day\android\app\build.gradle:
android {
compileSdkVersion 33
...
}
android>app>build.gradle
compileSdkVersion 33
targetSdkVersion 33

Android API 31 level causes error for Flutter local notifications in the app

As per Google's policy, I updated my targetSdkVersion and compileSdkVersion to 31. But I noticed that the Flutter local notification package now throws error for incoming messages as below:
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
I went through all the Stack overflow answers related to this error and made following changes:
Added below Java and Kotlin dependencies in build.gradle file:build.gradle file
Added this receiver below activity tag:
Receiver tag
Added exported flag under activity tag:
Exported flag
Updated gradle version to latest in gradle-wrapper.properties:
Latest gradle version
I am not using any PendingIntent in my code, and simulating app on simulator with API 31 level. Could someone please help me in resolving this issue with message notifications?

Is there a way to check if a particular flutter plugin will work with a particular Android/IOS operating version?

I'd like to know if there is a way to determine if a flutter plugin will operate on a particular Android or IOS operating version?
For example would a flutter plugin like:
https://pub.dev/packages/http/
Work on android version 6 and older?
I expect that it would be dependent on the version of the plugin I'm intending to use.
Is there an easy way to check this?
You can view build.gralde file for check minimum Android version and plugin_name.podspec file (where plugin_name is name of the plugin) for minimum iOS requirements. Many plugins on pub.dev contains links to its source code (on GitHub or etc.)).
build.gradle contains in android folder, and you need to find line like this:
defaultConfig {
minSdkVersion 21
}
plugin_name.podspec file contains in ios folder, you need to find like this:
s.platform = :ios, '9.0'
Config files also contains more information about what version of Language plugin using.

how to ensure my flutter application is compatible with android 4.1?

i would like to make possible to install and use my flutter application on a phone which has a android OS version 4.1, but when i run my code on a simulator the result is :
i cannot open the app no matter how many times i try it.
and my api and sdk versions are : minSdkVersion 16 targetSdkVersion 29
is my api version the problem? play store says about this the minimum OS compatible is 4.1 but it does not work