[英]keystore password was incorrect/Gradle task assembleRelease failed with exit code 1
[英]Flutter build apk doesn't work and shows Gradle task assembleRelease failed with exit code 1
這是我在構建應用程序時遇到的錯誤:
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
提前致謝。
該錯誤清楚地為您提供了兩種構建 APK 的選項。 如果您嘗試將其上傳到 Play 商店,那么創建應用程序包可能是最佳選擇。 只需按照錯誤中的指示生成應用程序包:
flutter build appbundle --target-platform android-arm,android-arm64
這將在您的發布文件夾中創建.aab 文件 - <app dir>/build/app/outputs/bundle/release/app.aab
然后您應該能夠將此 aab 文件上傳到 Play 商店。
上面錯誤消息中的第二個選項將生成兩個 APK(一個用於 32 位,一個用於 64 位)。
有關此的更多信息 - Flutter 網站
祝你好運!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.