任务':firebase_auth:compileDebugJavaWithJavac'的执行失败

时间:2019-02-04 18:59:14

标签: firebase dart flutter firebase-authentication

将firebase_auth从早期版本升级到^ 0.8.0 + 1后,对我来说会产生错误。 这是错误

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':firebase_auth:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 2s
Finished with error: Gradle task assembleDebug failed with exit code 1

2 个答案:

答案 0 :(得分:1)

根据Changelog,您必须在Android项目中执行向AndroidX的迁移。

changes required are here的详细信息。

请参阅CHANGELOG:

  

0.8.0   零钱。从已弃用的原始Android支持库迁移到AndroidX。这不应该导致任何功能上的变化,但是如果使用原始支持库的所有also migrate插件都需要使用此插件的Android应用。

答案 1 :(得分:0)

首先在android / app / build.gradle文件中将 compileSdkVersion 设置为 28 。 其次,将以下内容添加到您的android / gradle.properties文件中:

android.useAndroidX=true
android.enableJetifier=true