我對此很新,並希望如果有人能真正愚蠢的這下來我。我一直在不斷收到這4個錯誤,而且相當令人沮喪。4錯誤 - 錯誤:包com.google.android.gms.appstate等ETC
我目前在Mac上使用Android Studio。當我嘗試創建構建時彈出這些錯誤,並且我嘗試在線搜索此問題,但這是我發現的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.
您必須發佈生成這些錯誤的代碼,並解釋您嘗試修復它們的方法。 – FiReTiTi
我編輯了更多信息的問題,我不確定這是否有幫助。請告訴我。 – bluejon