'构建失败可能是由于插件中的AndroidX不兼容。该工具将尝试使用Jetfier解决不兼容问题。”

时间:2020-06-08 10:06:49

标签: android firebase flutter firebase-realtime-database

运行Flutter应用程序时遇到了这个问题: 由于插件中的AndroidX不兼容,构建失败。该工具将尝试使用Jetfier解决不兼容问题。 请帮助

C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:8: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                               ^                 
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:538: error: cannot find symbol
  public void onComplete(@NonNull Task<AuthResult> task) {
                          ^
symbol:   class NonNull
location: class FirebaseAuthPlugin.SignInCompleteListener
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:558: error: cannot find symbol
  public void onComplete(@NonNull Task<Void> task) {
                          ^
symbol:   class NonNull
location: class FirebaseAuthPlugin.TaskVoidCompleteListener
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:576: error: cannot find symbol
  public void onComplete(@NonNull Task<ProviderQueryResult> task) {
                          ^
symbol:   class NonNull
location: class FirebaseAuthPlugin.ProvidersCompleteListener
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:175: error: cannot find symbol
                    public void onComplete(@NonNull Task<AuthResult> task) {
                                            ^
symbol: class NonNull
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:270: error: cannot find symbol 
  public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                                        ^
symbol: class NonNull
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:435: error: cannot find symbolpublic void onComplete(@NonNull Task<GetTokenResult> task) {
                                    ^
symbol: class NonNull
C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:487: error: cannot find symbol
        public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                                        ^
symbol: class NonNull
Note: C:\Users\user\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors

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 5m 32s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Exception: The plugin cloud_firestore could not be built due to the issue above.
Exited (sigterm)

0 个答案:

没有答案