我正在尝试在我的应用程序中实现Firebase身份验证和Firestore。一个简单的登录和注册页面。我总是得到相同的错误(如下)。我尝试回滚到较早的依赖项,甚至尝试着迁移到AdroidX的步骤。我已经在github上尝试了其他解决方案并导致堆栈溢出,但是我无法解决此问题!
谢谢您的帮助!
Analyzing firebase...
No issues found! (ran in 7.8s)
在这里。 ->
[✓] Flutter (Channel master, v1.7.9-pre.7, on Mac OS X 10.14.4 18E226, locale en-CA)
• Flutter version 1.7.9-pre.7 at /Users/SamuelChen/Dev/flutter
• Framework revision 429726e391 (4 days ago), 2019-06-23 17:01:55 -0400
• Engine revision 1be3ee342c
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/SamuelChen/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• CocoaPods version 1.6.1
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 36.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] IntelliJ IDEA Community Edition (version 2019.1.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 35.2.3
• Dart plugin version 191.7019
[✓] VS Code (version 1.35.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.1.0
[✓] Connected device (3 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• macOS • macOS • darwin-x64 • Mac OS X 10.14.4 18E226
• web • web • web-javascript • Google Chrome 75.0.3770.100
• No issues found!
Launching lib/main.dart on Android SDK built for x86 in debug mode...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
F/crash_dump32(16827): crash_dump.cpp:460] failed to attach to thread 1544: Permission denied
ERROR: [TAG] Failed to resolve variable '${junit.version}'
ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:8: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:9: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
^
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:638: error: cannot find symbol
private void reportException(Result result, @Nullable Exception exception) {
^
symbol: class Nullable
location: class FirebaseAuthPlugin
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:550: error: cannot find symbol
public void onComplete(@NonNull Task<AuthResult> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.SignInCompleteListener
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:569: error: cannot find symbol
public void onComplete(@NonNull Task<Void> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.TaskVoidCompleteListener
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:587: error: cannot find symbol
public void onComplete(@NonNull Task<SignInMethodQueryResult> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.GetSignInMethodsCompleteListener
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:186: error: cannot find symbol
public void onComplete(@NonNull Task<AuthResult> task) {
^
symbol: class NonNull
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:445: error: cannot find symbol
public void onComplete(@NonNull Task<GetTokenResult> task) {
^
symbol: class NonNull
/Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java:499: error: cannot find symbol
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
^
symbol: class NonNull
Note: /Users/SamuelChen/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.7.0/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
9 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 44s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See ___ for more information on the problem and how to fix it.
*******************************************************************************************
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)