简体   繁体   中英

How can I build the apk from android studio from flutter

now I'm making an app using flutter and trying to upload the app as internal test on Google play store. I saw people asking how to do it, but could not figure it out... On the official document, it says "Build > Build > Generate Signed Bundle/APK" and I can generate APK, but I don't see the "Generate Signed Bundle/APK".

在此处输入图像描述

When I select "Build APK" in the picture above, it gives me the message like

You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64. If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size. To generate an app bundle, run: flutter build appbundle --target-platform android-arm,android-arm64,android-x64 Learn more on: https://developer.android.com/guide/app-bundle To split the APKs per ABI, run: flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split Running Gradle task 'assembleRelease'...
27.9s ✓ Built build/app/outputs/apk/release/app-release.apk (19.2MB). Process finished with exit code 0

Also, I saw this chat ( How to build signed apk from Android Studio for Flutter ), but I cannot see "open android module in android studio" 在此处输入图像描述

Even when I opened the android project with different window, I cannot see the option as well..

在此处输入图像描述

it will be really helpful if someone can teach me how to generate the APK from my current situation...

Thank you so much..

The reason why Open Android module in Android Studio is missing under Tools > Flutter is likely because you're using an older version of Flutter DevTools on Android Studio. You can run flutter pub global activate devtools on the Terminal to update the DevTools installed on the machine as mentioned on this guide .

to build apk use this line in terminal

flutter build apk --release --no-sound-null-safety

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM