颤振:我无法构建 android apk

时间:2021-01-28 20:13:34

标签: java android flutter dart gradle

我正在尝试创建我的 APK 应用程序,但它失败并在 android studio 终端中打印此错误:

C:\flutter\bin\flutter.bat --no-color build apk
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
Running Gradle task 'assembleRelease'...  

                  



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: E:\flutter\2021\my_flutter_app\build\app\intermediates\flutter\debug\libs.jar.
         > Transform's input file does not exist: E:\flutter\2021\my_flutter_app\build\app\intermediates\flutter\debug\libs.jar. (See https://issuetracker.google.com/issues/158753935)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9m 19s
Running Gradle task 'assembleRelease'...                          562.4s (!)
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1

在调试模式下,应用程序运行!! 我希望你能帮助我解决错误

0 个答案:

没有答案