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:UsersHPDesktopapptest_iandroidappbuild.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 libmain.dart on sdk gphone x86 in debug mode…
Running Gradle task ‘assembleDebug’… 7.8s
√ Built buildappoutputsflutter-apkapp-debug.apk
Installing buildappoutputsflutter-apkapp-debug.apk… 1,870ms
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install C:UsersHPDesktopapptest_iibuildappoutputsflutter-apkapp-debug.apk: Failure
[INSTALL_FAILED_INSUFFICIENT_STORAGE] Error launching application on sdk gphone x86.
Any help, guys?
2
Answers
Finally, I found the solution:
minSdk = flutter.minSdkVersion
" to "minSdk = 23
". For me, it was 23, and it's the same SDK version given in the error.pubspec.yaml
to the latest (or any)firebase_auth: ^5.1.4
orfirebase_auth: any
flutter clean
and thenflutter pub get
commandsUpdate:
Please update the minSdkVersion to 24 in build.gradle file