Generate android App Bundle with x86 version
The x86 architecture is not supported at this time.
https://flutter.dev/docs/deployment/android#what-are-the-supported-target-architectures
GunJack
I don't worry about life as I know, I am not going to survive it anyways.
Updated on December 23, 2022Comments
-
GunJack over 1 year
I use flutter to develop my app. However, to generate an app bundle and upload it to play console, I use Android Studio (Build -> Generate Signed Apk).
In flutter I have the option of generating three distinct apks for three architectures (arm, arm64 and x86(64?)) through flutter build commands. However when I generate signed app bundle from Android Studio and upload it play console, I only get two build variants or abi (arm64-v8a, armeabi-v7a). How do I make my app bundle include an x86 abi?
Additional: I only use Android Studio to generate App Bundle. I use VS Code to write these apps.
Edit: The module/App level build.gradle
def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'com.google.gms.google-services' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 29 sourceSets { main.java.srcDirs += 'src/main/kotlin' } lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.spayro.spayroshop" minSdkVersion 21 targetSdkVersion 29 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } } } flutter { source '../..' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" }
-
Spatz over 3 yearsCan you show
build.gradle
content? -
GunJack over 3 yearsThe project level or the module level?
-
Spatz over 3 yearsmodule-level developer.android.com/studio/build/…
-
Spatz over 3 yearsDoes this answers your question?
-
-
GunJack over 3 yearsNDK? Are you sure? I am not using the NDK.
-
miken32 almost 2 yearsCopied without attribution from stackoverflow.com/a/56112744