我最近一直在写一个名为app002的应用程序,但是我遇到了一些问题,我需要知道如何解决它们,我使用GitBash作为终端机
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.
这名突击队员花了太多时间并且没有受到谴责
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...
我也尝试这个,但是什么也没有
$ 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...
在项目目录中创建了一个名为build的文件夹,但在其中仅存在app.dill
文件。没有apk没有iOs文件
请帮助!!! 感谢
最后花了很长时间,但是谢谢你,谢谢
PS E:\programes\Flutter_Req\sourceCode\app003> flutter build appbundle --target-platform android-arm,android-arm64
Running "flutter pub get" in app003... 8,9s
Initializing gradle... 6,4s
Resolving dependencies...
520,4s (!)
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done 314,3s (!)
Built build\app\outputs\bundle\release\app.aab (10.5MB).
我可以在其中找到APK文件的地方!
您需要运行flutter build apk
而不是appbundle
。打算将应用程序捆绑发送到Google Play,后者会为您生成和优化apk。完成后,apk将位于build\app\outputs\bundle\release\
文件夹中。