我对此很陌生,如果有人愿意为我愚蠢地做,我会很喜欢。我一直在不断收到这4个错误,它令人非常沮丧。
我目前在Mac上使用Android Studio。当我尝试创建内部版本并尝试在线搜索此问题时会 pop 这些错误,但这是我发现LINK仍然没有帮助的原因。
/Users/name/Desktop/test/game/BaseGameUtils/src/main/java/com/google/example/games/basegameutils/GameHelper.java
Error:(32, 39) error: package com.google.android.gms.appstate does not exist
Error:(293, 28) error: cannot find symbol variable AppStateManager
Error:(294, 30) error: cannot find symbol variable AppStateManager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details. Error:Execution failed for task ':BaseGameUtils:compileDebugJava'.
> Compilation failed; see the compiler error output for details.
这不允许我创建任何版本
Information:BUILD FAILED
/Users/name/Desktop/test/game/BaseGameUtils/src/main/java/com/google/example/games/basegameutils/GameHelper.java:32: error: package com.google.android.gms.appstate does not exist
import com.google.android.gms.appstate.AppStateManager;
^
/Users/name/Desktop/test/game/BaseGameUtils/src/main/java/com/google/example/games/basegameutils/GameHelper.java:293: error: cannot find symbol
builder.addApi(AppStateManager.API);
^
symbol: variable AppStateManager
location: class GameHelper
/Users/name/Desktop/test/game/BaseGameUtils/src/main/java/com/google/example/games/basegameutils/GameHelper.java:294: error: cannot find symbol
builder.addScope(AppStateManager.SCOPE_APP_STATE);
^
symbol: variable AppStateManager
location: class GameHelper
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':BaseGameUtils:compileDebugJava'.
> 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.
最佳答案
看起来:
关于java - 4个错误-: package com.google.android.gms.appstate ETC错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35779259/