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

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

Related

How to build to Android 29 ? error : requires Android SDK version 31

Hello I have done flutter null safety migration, and upgrade all my packages, but now when I try to build appbundle, I have this error for somes package : requires Android SDK version 31.`
I don't want to build only for versions >= 31 , to not restrict users with old device, and me to test on my old device.
I tried to read package changelog to downgrade brefore sdk 31 requirement, but I have always error ... I don't understand
I have also this error plungin flutter_plugin_android_lifecycle requires Android SDK version 31.I never use in my pubspec.yaml flutter_plugin_android_lifecycle, so I don't know how to downgrade this "package"
Here is my build grade
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.google.gms:google-services:4.3.3'
}

One or more plugins require a higher Android SDK version error occurs when i run the project

One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to C:\Users\Najeeb Khan\Desktop\codecanyon-30196044-single-market-groceryfoodpharmacy-androidiosadmin-panel-full-app-solution-with-web-site\Market_v2.1.2\customerApp\android\app\build.gradle:
android {
compileSdkVersion 31
...
}
It clearly says that the third-party plugin used in your project (pubspec. yaml) works only on complileSdkVersion 31. Go to your android/app/build. Gradle and change it to compileSdkVersion to 31 or 32. It will work.
Change compileSdkVersion to 32 if it is 31 in
android\app\build.gradle
The error I got was like this:
One or more plugins require a higher Android SDK version. Fix this
issue by adding the following to
C:\xxx\xxx\project_name\android\app\build.gradle:
android {
compileSdkVersion 33
...
}
In C:\xxx\xxx\project_name\android\app\build.gradle
android {
compileSdkVersion 33// flutter.compileSdkVersion
...
}
Comment out the old code and type 33
implementation 'com.google.android.material:material:33'

Flutter build failed after `flutter upgrade` to 2.10

What is causing the following build exception in an existing Flutter project after upgrading flutter to 2.10?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window-java:1.0.0-beta04.
AAR metadata file: C:\Users\Blah\.gradle\caches\transforms-2\files-2.1\602ce26881e3b92788ae83c190d3c36f\jetified-window-java-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window:1.0.0-beta04.
AAR metadata file: C:\Users\Blah\.gradle\caches\transforms-2\files-2.1\9520e6f13992d2f4d96b17b856330597\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
Flutter 2.10 support for Foldable devices via AndroidX
Flutter 2.10 added support for foldable Android devices.
This relies on Android SDK API version 31's AndroidX library dependency of: androidx.window:window-java:1.0.0
The build failed because:
this new AndroidX dependency requires Android compileSdkVersion of 31 or higher.
It also requires kotlin_version of 1.5.31 or higher.
So existing Flutter/Android projects may need some gradle file changes:
android/build.gradle:
bump ext.kotlin_version to at least 1.5.31 (1.6.10 is available as of Feb 2022)
buildscript {
ext.kotlin_version = '1.5.31'
android/app/build.gradle
bump compileSdkVersion to 31 or higher
android {
compileSdkVersion 31
If you don't have Android 12 SDK (API level 31) installed...
Install & Use SDK API 31 (Android 12) in Android Studio
In Android Studio
go to Tools > SDK Manager > tick/check Android 12 (S) API Level 31 > click OK button > wait for download/install
Platform & Project Settings
Next we need to add Android SDK API 31 to our Project Structure under both Platform Settings and Project Settings
Android Studio > File > Project Structure
Under Platform Settings click SDKs
In the middle column click + icon button, select "Add Android SDK.."
You will be prompted to select an Android SDK directory
Select your Android Sdk root directory like C:\Android\Sdk
do not select the specific API version like C:\Android\Sdk\platforms\android-31. This will be rejected.
A "Create New Android SDK" window will pop up.
By default Java SDK 11 & Build target: Android API 31 will be preselected. If not, select them.
Click OK.
Android API 31 Platform is now available for your Project.
Now under Project Settings, click on Project
On the right under Project SDK:
Click the dropdown list
Select Android API 31 Platform
Click OK
We're done.
Android 12 SDK API 31 is now installed and ready to compile this project.
You should Set both compileSdkVersion and targetSdkVersion to 31 in your build.gradle(app) file.
android {
compileSdkVersion 31 // <-- This
defaultConfig {
applicationId "com.example.app"
targetSdkVersion 31 // <-- and this too
// ...
}
}
I hade the same issue, all those listed above did not for me, what worked for me is that i downgrade the geolocator from 9.0.1 to 7.7.0

Unable to figure out,No Build tools found

Error:No installed build tools found. Install the Android build tools version 19.1.0 or higher.
Every time i used to gradle sync the project from android studio,I got above error.
Try to change your gradle version in /projectName/build.gradle
classpath 'com.android.tools.build:gradle:x;xxxx'
Then download the new version of the build tools 19.1 and change the following line in /projectName/moduleName/build.gradle
android {
compileSdkVersion 19
buildToolsVersion "19.1" //Set this to 19.1 after SDK update
...
}
Sync your gradle files and it should be working now.

Unable to import new Gradle project:failed to find Build Tools revision 25.2.4

When I try to import https://github.com/TomGrill/gdx-firebase this project in eclipse,I got this error
"Could not find com.android.support:support-v4:24.0.0."
I have done installation of latest android sdk tools 25.2.4 from android sdk manager and updated the following changes in build.gradle.
compileSdkVersion 23
buildToolsVersion "25.2.4"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
}
currently I am getting this error
"failed to find Build Tools revision 25.2.4"
Can anyone tell me,how do I fix this?
Update
I am still getting this error while importing that project,how to fix this?
"Could not find com.android.support:support-v4:24.0.0."
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
file:/Users/divya/.m2/repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
file:/Users/divya/.m2/repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
https://oss.sonatype.org/content/repositories/snapshots/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
https://oss.sonatype.org/content/repositories/snapshots/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
https://oss.sonatype.org/content/repositories/releases/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
https://oss.sonatype.org/content/repositories/releases/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
file:/Applications/android/android-sdk-macosx/extras/google/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.pom
file:/Applications/android/android-sdk-macosx/extras/google/m2repository/com/android/support/support-v4/24.0.0/support-v4-24.0.0.aar
Required by:
de.tomgrill.gdxfirebase.android:android:0.0.4-SNAPSHOT > com.google.firebase:firebase-database:9.8.0 > com.google.android.gms:play-services-basement:9.8.0
Check buildToolsVersion, you have in Android SDK Manager. Currently latest is 25.0.2.
Android SDK Build-tools is different from
Android SDK Tools(latest 25.2.4) and
Android SDK Platform-tools(latest 25.0.3).
Hopefully it may be helpful
Thanks