Issue
I have been writing an app in flutter recently Named app002 , But I faced with some problems I need to know how to solve them , I use a GitBash as a Terminal
Flutter Doctor
lamoh@DESKTOP-QUA3N6C MINGW64 /e/programes/Flutter_Req/sourceCode
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.15063], locale ar-DZ)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code, 64-bit edition (version 1.40.2)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
this commande take too much time and not excuted
flutter build apk
elamoh@DESKTOP-QUA3N6C MINGW64 /e/programes/Flutter_Req/sourceCode/app002
$ flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64.
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
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 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Initializing gradle... 2,0s
Resolving dependencies...
i try this also but nothing
$ flutter build appbundle --target-platform android-arm,android-arm64
lamoh@DESKTOP-QUA3N6C MINGW64 /e/programes/Flutter_Req/sourceCode/app002
**$ flutter build appbundle --target-platform android-arm,android-arm64**
Initializing gradle... 2,3s
Resolving dependencies...
in the project directory a folder named build was created but in inside there are only app.dill
file exist . no apk no iOs files
help please !!! thanks
Solution
You need to run flutter build apk
instead of appbundle
. An app bundle is intended to be sent to Google Play, which will generate and optimize the apk for you. Once done, the apk will be in the build\app\outputs\bundle\release\
folder.
Answered By - gi097
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.