这是我在构建应用程序时得到的错误:
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... 0.5s
Resolving dependencies... 2.0s
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 79.9s
Gradle task assembleRelease failed with exit code 1这是flutter run -v命令的输出:https://controlc.com/3bc5e348
提前谢谢。
发布于 2019-11-27 23:52:51
这个错误清楚地给了你两个选择来构建你的APK。如果你想把它上传到Play商店,那么创建一个应用程序包可能是最好的选择。只需按照错误中的说明生成应用包即可:
flutter build appbundle --target-platform android-arm,android-arm64
这将在您的发布文件夹- <app dir>/build/app/outputs/bundle/release/app.aab中创建.aab文件
然后,您应该能够上传此aab文件到Play store。
上述错误消息中的第二个选项将生成两个APK(一个用于32位,另一个用于64位)。
关于这个的更多信息- Flutter site
祝好运!
https://stackoverflow.com/questions/59072744
复制相似问题