Why flutter asks to install Android SDK Platform 29? - flutter

Flutter Installing SDK Platform 29
in my build.gradle (app) contain:
compileSdkVersion 31
minSdkVersion 21
targetSdkVersion 31
I use an emulator with API 24 (Android 7.0) and SDK Platform 31 is also already installed on my computer. Why does flutter keep asking to install SDK platform 29?

Related

my flutter app not be run in android version 8 in real device

** just completed my flutter app and I want to install him in different real devices, in devices with android version 10.0 is working perfectly but in devices with android version 8.0 not be installed**
Go to
Project>android>app>src>main>AndroidManifest.xml and check for the parameter targetSdkVersion
Change that to 29

Flutter release APK does not run on Android 10 and 11

Flutter release APK does not run on Android 10 and 11, is there a plugin that doesn't support it?
name: stynext
Update your build configuration to compileSdkVersion 30 in build.gradle file

Error adding Flutter web-view plugin in version 1.20.4

I would like to use flutter-web plugin in my app. However, I am getting the following SDK error when I add it to my YAML file. I just upgraded to 1.20.4
How do I fix this error?
The current Flutter SDK version is 1.20.4.
Because app depends on webview_flutter >=1.0.0 which requires Flutter SDK version >=1.22.0 <2.0.0, version solving failed.
pub get failed (1; Because app depends on webview_flutter >=1.0.0 which requires Flutter SDK version >=1.22.0 <2.0.0, version solving failed.)
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.49.2)
[✓] Connected device (1 available)
• No issues found!
This is the info in my pubspec.yaml file
environment:
sdk: ">=2.2.2 <3.0.0"
webview_flutter package need minSdkVersion 19 so you have to change the app level gradle
android {
defaultConfig {
// Required by the Flutter WebView plugin.
minSdkVersion 19
}
}
after upgrade your flutter using
flutter upgrade
and then import webview_flutter In your pubspec.yaml file
webview_flutter: ^1.0.0 because webview_flutter is stable in flutter 1.22 stable release.
I was facing the same problem but I did not know the path of that build.gradle so I found it after spending some time.
You have to edit the build.gradle file. In a flutter project, it is found at the path ./android/app/build.gradle.
The parameter that needs to be changed is, of course, minSdkVersion 16, bumping it up to what you need (in this case 19).
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.web_view_example"
minSdkVersion 19 //This is what you need to change.
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
For my case, I'm using linkedin_login: ^2.2.1 mean which LinkedIn lib also using webview (iOS is working) but Android it requires to downgrade minSDKVersion to 16. Please open android folder as Android Project in order to see like this. Hope it help you too.

My Flutter App Showing "Your device isn't compatible with this version"

I have a Flutter app that I've just launched to the play store but in my android oreo phone, it's showing "Your device isn't compatible with this version".
In my build.gradle file
minSdkVersion 16
targetSdkVersion 28
Could someone please help me with this?
Edit: Also if it helps my compileSdk version is 28

flutter can not generate x86, x86_64 apk file

I want to generate apk file that support :
'armeabi-v7a','arm64-v8a','x86','x86_64'
I used the command :
flutter build apk --flavor production
and also
flutter build appbundle --target-platform android-arm,android-arm64
The result will always be only arm64-v8a, and armeabi-v7a
I tried to change defaultConfig in android/build.gradle
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "XXX"
minSdkVersion 16
targetSdkVersion 28
versionCode VERSION_CODE
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [AppLabelName: "XXX"]
multiDexEnabled true
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
}`
then run
flutter build apk --flavor production
still didn't work,
When I tried to test it on
ASUS T00P • EAAZCY03U504 • android-arm • Android 4.4.2 (API 19)
it always show error
Performing Push Install
build\app\outputs\apk\production\release\app-production-release.apk: 1 file pushed. 3.5 MB/s (33320272 bytes in 9.085s)
pkg: /data/local/tmp/app-production-release.apk
Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]
AFAIK, the official documentation stated that support building for x86 Android is not yet available:
When building your application in release mode, Flutter apps can be
compiled for
armeabi-v7a (ARM
32-bit),
arm64-v8a
(ARM 64-bit), and
x86-64 (x86
64-bit). Flutter does not currently support building for x86 Android
(See Issue 9253).
And here as well:
We support and test running Flutter on a variety of low-end to high-end platforms. For a detailed list of the platforms on which we
test, see the list of supported
platforms.
Flutter supports building ahead-of-time (AOT) compiled libraries for x86_64, armeabi-v7a, and arm64-v8a.
Apps built for ARMv7 or ARM64 run fine (using ARM emulation) on many x86 Android devices.
We support developing Flutter apps on a range of platforms. See the system requirements listed under each development operating
system.
Regarding the support for building in x86 (32 bit), it was mentioned in this GitHub thread:
On master, Flutter now supports the x86_64 (64 bit) Android ABI. The
engine also has support for building in x86 (32 bit) by following
instructions at
https://github.com/flutter/flutter/wiki/JIT-Release-Modes