error while installing google maps package - flutter

i tried to install google maps package but it doesn't work when i run the app
here is the pubspec.yamlenter image description here
and the error is :
enter image description here
i already tried aloder versions like google-maps:1-0-0 but it doesn't work and also updating the sdk will effect all the project

The minimum sdk must be greater that 20 for the plugin to use.
Go to android -> app -> build.grade and update the values as following
compileSdkVersion 31
minSdkVersion 21
targetSdkVersion 31
stop the emulator and run the app again

Related

Flutter: speech_to_text fail to initialize with android emulator

I try to implement speed_to_text example https://pub.dev/packages/speech_to_text with Pixel C API 31 emulator but it failed
seems to be speed_to_text never initialized
however it works when I run on chrome web
I have add permission in manifest, use the minimum API version 31: minSdkVersion 31, targetSdkVersion 31 and compileSdkVersion 31 in build.gradle
I look in mobile emulator for microphone permission and seems to be OK
what else I should check?

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

Flutter release apk not installing on Samsung A51

Any idea why flutter apk release file fails to install on a Samsung A51 device?
I've tried the following to solve the problem.
Uninstall previous app
From phone settings -> applications, and enabled the option 'Allow app from unknown source
Update phone operating system to latest version
But the problem continued.
The error says: problem parsing package
Usually, the problem occurs when targetSdkVersion in android/app/build.gradle is less than the Android version installed on your phone.
For example
The targetSdkVersion is 29 but if your phone has installed Android 10 (SDK 30), it will not be able to install the file.

My flutter app is not displaying in chrome when launched with no errors and when run to my android it gives me errors

The error says the number of method references in dex file cannot exceed 64.
I have tried changing the emulator I used and also changed how I launch the app, but no display still.
Try setting
minSdkVersion = 21
or higher in your gradle file and tell us if it fixes
The problem is with the multidex file of android.
Setting minSdkVersion to 21 or higher enable by default multidex. If you want to keep down the minsdk, you could also follow the answer that was given here:
How to enable multidexing with the new Android Multidex support library

Programing with Android studio 3.2 and making apk

I'm writing an application with android studio 3.2.
Everything is okay when I install it on an emulator but when I make an apk and install it on real phone, it dosen't run!!
compileSdkVersion 28
minSdkVersion 16
targetSdkVersion 28
I want this app to be installed on android 4.1 or higher!
What changes are needed to run this app?
In your mobile open
setting > about mobile>Build number (press on it 7 times)
after that return to
setting > you will noticed that new choosing add (Developer options ) open it and make USB Debugging "active"
Press 7 times:
Finally: open it and make the USB Debugging active