问题描述
在使用OAuth和google_sign_in使用Gmail创建登录时遇到此错误:在Flutter应用程序中为^ 4.5.5
[38;5;248mLaunching lib\main.dart on dub LX1 in debug mode...[39;49m
lib\main.dart
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:23: error: package com.google.android.gms.tasks does not exist
import com.google.android.gms.tasks.OnCompleteListener;
^
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:24: error: package com.google.android.gms.tasks does not exist
import com.google.android.gms.tasks.RuntimeExecutionException;
^
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:25: error: package com.google.android.gms.tasks does not exist
import com.google.android.gms.tasks.Task;
^
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:471: error: cannot find symbol
private void onSignInResult(Task<GoogleSignInAccount> completedTask) {
^
symbol: class Task
location: class Delegate
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:363: error: cannot find symbol
Task<GoogleSignInAccount> task = signInClient.silentSignIn();
^
symbol: class Task
location: class Delegate
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:369: error: cannot find symbol
new OnCompleteListener<GoogleSignInAccount>() {
^
symbol: class OnCompleteListener
location: class Delegate
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:404: error: cannot find symbol
new OnCompleteListener<Void>() {
^
symbol: class OnCompleteListener
location: class Delegate
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:424: error: cannot find symbol
new OnCompleteListener<Void>() {
^
symbol: class OnCompleteListener
location: class Delegate
E:\Flutter_windows_1.20.4-stable_1\Flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.5\android\src\main\java\io\Flutter\plugins\googlesignin\GoogleSignInPlugin.java:479: error: cannot find symbol
} catch (RuntimeExecutionException e) {
^
symbol: class RuntimeExecutionException
location: class Delegate
9 errors
FAILURE: Build Failed with an exception.
* What went wrong:
Execution Failed for task ':google_sign_in: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 52s
Exception: Gradle task assembleDebug Failed with exit code 1
Exited (sigterm)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)