Flutter and Android SDK errors


I have the following error when building a flutter project for Android:

Your project is configured to compile against Android SDK 37, but the following plugin(s) require to be compiled against a higher Android SDK version:
- audioplayers_android compiles against Android SDK 2147483647
- camera_android_camerax compiles against Android SDK 2147483647
- firebase_core compiles against Android SDK 2147483647
- firebase_messaging compiles against Android SDK 2147483647
- flutter_local_notifications compiles against Android SDK 2147483647
- flutter_plugin_android_lifecycle compiles against Android SDK 2147483647
- geolocator_android compiles against Android SDK 2147483647
- jni compiles against Android SDK 2147483647
- jni_flutter compiles against Android SDK 2147483647
- native_camera_sound compiles against Android SDK 2147483647
- package_info_plus compiles against Android SDK 2147483647
- shared_preferences_android compiles against Android SDK 2147483647
- url_launcher_android compiles against Android SDK 2147483647
- wakelock_plus compiles against Android SDK 2147483647
Fix this issue by compiling against the highest Android SDK version (they are backward compatible).
Add the following to C:\Develop.DCore\Desytec-Security-Platform\Mobile\DCoreSecurity\dcore_security\android\app\build.gradle.kts:

    android {
        compileSdk = 2147483647
        ...
    }

If I do what the message suggests, other error occures because the path Android\Sdk\platforms\android-2147483647 is missing. This is obvious because the last SDK installed is 37.1, so,the path for a last version is android-37.1

How can I solve this issue?

0
Nov 20 at 1:05 AM
User Avatarjstuardo
#android#flutter

No answer found for this question yet.