当前位置: 首页 > 知识库问答 >
问题:

颤振释放apk错误:任务执行失败“:app:lintVitalRelease”

陆子航
2023-03-14

我不能再发布我的应用程序了。我使用的是AndroidStudio 4.0和FlatterSDK版本1.17。5.上个月我已经发布了两次我的应用程序,但现在我真的不知道错误的原因是什么。当我在终端中键入flatterbuildapk--release时,会出现以下错误:

        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:profileRuntimeClasspath'.

   > Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.

      > Execution failed for JetifyTransform: ....\build\app\intermediates\flutter\profile\libs.jar.

         > Failed to transform '....\build\app\intermediates\flutter\profile\libs.jar' using Jetifier. Reason: FileNotFoundException, message: ....\build\app\intermediates\flutter\profile\libs.jar (The system cannot find the path specified). (Run with --stacktrace for more details.)

           Please file a bug at http://issuetracker.google.com/issues/new?component=460323.



* 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 42s
Running Gradle task 'assembleRelease'...                           43.4s
Gradle task assembleRelease failed with exit code 1

共有3个答案

邹麻雀
2023-03-14

我已经升级了gradle构建工具3.5。0 -

下面的解决方案对我有效

进入android文件夹-

lintOptions {
  disable 'InvalidPackage'
  checkReleaseBuilds false //Insert this line
}
昝存
2023-03-14

对我来说,只有这样:

First: flutter build apk --debug
Then: flutter build apk --profile
In the end: flutter build apk --release
颜功
2023-03-14

如果错误是关于profile/libs。jar,在终端中执行以下操作:

flutter build apk --profile

然后呢

flutter build apk --release  

解决了这个问题。

如果错误是关于debug/libs。jar

flutter build apk --debug

然后呢

flutter build apk --release  

会解决问题的

 类似资料: