【发布时间】:2020-04-29 03:04:38
【问题描述】:
失败:构建失败并出现异常 Firebase admob 在我的 Flutter 应用程序中运行良好,但在运行 build appbundle --release 时出现如下错误:
错误输出
PS D:\Projects\new\kjv_bible> flutter build appbundle --release
Running Gradle task 'bundleRelease'...
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':firebase_core_web:compileReleaseJavaWithJavac'.
> File 'D:\Projects\new\kjv_bible\build\firebase_core_web\intermediates\annotation_processor_list\release\annotationProcessors.json' specified for property 'processorListFile' does not exist.
* 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 3m 26s
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done 209.8s (!)
Gradle task bundleRelease failed with exit code 1
颤振医生
运行 flutter doctor 并粘贴下面的输出:
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.720], locale en-US)
• Flutter version 1.12.13+hotfix.9 at C:\src\flutter
• Framework revision f139b11009 (4 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\ljoe0\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
instructions.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.0.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code, 64-bit edition (version 1.44.2)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.9.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
我在 pubspec.yaml 中添加了 Firebase_core,但仍然出现同样的错误。 我用谷歌搜索了这个错误几个小时,但无济于事。 请问这个错误有什么问题?
【问题讨论】:
-
现在已通过删除项目根文件夹中的 .gradle 目录进行修复。谢谢!!
-
也为我工作,谢谢。