当我发布我的应用程序flutter应用程序时,这种情况发生在android工作室


C:UsersiDesktopNew folderCovid-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:UsersiDesktopNew folderCovid-19-Flutter-UI-masterandroidappbuild.grad
le' line: 50
* What went wrong:
Could not compile build file 'C:UsersiDesktopNew folderCovid-19-Flutter-UI-masterandr
oidappbuild.gradle'.
> startup failed:
build file 'C:UsersiDesktopNew folderCovid-19-Flutter-UI-masterandroidappbuild.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:UsersiDesktopNew folderCovid-19-Flutter-UI-master>

按照以下步骤操作:https://flutter.dev/docs/deployment/android

Flutter和Android也建议使用App bundle作为首选,而不是APK,所以在完成所有步骤后,请尝试使用flutter build appbundle

相关内容

最新更新