flutter - 当我发布我的应用程序颤振应用程序时,这发生在 android studio
问题描述
C:\Users\i\Desktop\New folder\Covid-19-Flutter-UI-master>flutter build apk --release
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
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\i\Desktop\New folder\Covid-19-Flutter-UI-master\android\app\build.grad
le' line: 50
* What went wrong:
Could not compile build file 'C:\Users\i\Desktop\New folder\Covid-19-Flutter-UI-master\andr
oid\app\build.gradle'.
> startup failed:
build file 'C:\Users\i\Desktop\New folder\Covid-19-Flutter-UI-master\android\app\build.gr
adle': 50: expecting anything but ''\n''; got it anyway @ line 50, column 15.
" }
^
1 error
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to g
et more log output. Run with --scan to get full insights.
Gradle task assembleRelease failed with exit code 1
C:\Users\i\Desktop\New folder\Covid-19-Flutter-UI-master>
解决方案
遵循所有这些步骤:https ://flutter.dev/docs/deployment/android
Flutter 和 Android 还推荐使用 App bundle 作为首选,而不是 APK,因此flutter build appbundle
请在完成所有步骤后尝试使用。
推荐阅读
- javascript - git api 在执行 axios 调用时返回 401 未经授权的错误,但 curl 返回 200
- github - 如何检索拉取请求编号
- python - 连接字典的 n 值以在 Python 中为列表创建新值
- string - Teradata SQL - 行/记录之间的字符串相似性
- java - java 1.3 到 1.4 文本资源本地元素(资源包)
- jquery - 如何修复输出为 [object Object] 的嵌套 json 循环
- azure - Vnet 内的负载平衡 ACI
- vb.net - 如果显示消息,为什么从组合框的文本字段中清除文本?
- python - 如何确定 tkinter 中 ttk.Button 使用的字体?
- javascript - 正则表达式用双换行符分隔段落