Skip to content

The plugin requires a higher Android SDK version #6168

@amrf93

Description

@amrf93

Flutter: 3.22.3
Android Studio version: 2023.2
Firebase Component: Auth (Database, Firestore, Storage, Functions, etc)
Firebase Auth: 5.1.4

I have an error after I added Firebase Auth plugin:

The plugin firebase_auth requires a higher Android SDK version.
Fix this issue by adding the following to the file C:\Users\HP\Desktop\app\test_i\android\app\build.gradle: │
android {
defaultConfig {
minSdkVersion 23
}
}
Following this change, your app will not be available to users running Android SDKs below 23. │
Consider searching for a version of this plugin that supports these lower versions of the Android SDK instead.

But when I went to build.gradle I found it like this:
defaultConfig { applicationId = "com.example.test_i" minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName }

I;ve tried to replace flutter.minSdkVersion with 23, like this:
defaultConfig { applicationId = "com.example.test_i" minSdk = 23 targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName }

But it didn't work either, and gave me another error:

Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'... 7.8s
√ Built build\app\outputs\flutter-apk\app-debug.apk
Installing build\app\outputs\flutter-apk\app-debug.apk... 1,870ms
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install C:\Users\HP\Desktop\app\test_ii\build\app\outputs\flutter-apk\app-debug.apk: Failure
[INSTALL_FAILED_INSUFFICIENT_STORAGE]
Error launching application on sdk gphone x86.

Any help, guys?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions