由於此錯誤,無法編譯我的android項目。錯誤:com.google.android.gms.appstate包不存在
/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
Error:Execution failed for task ':BaseGameUtils:compileReleaseJava'.
Compilation failed; see the compiler error output for details. Information:BUILD FAILED
我gradle這個..
apply plugin:
'android-library' repositories
{
mavenCentral()
}
buildscript
{
repositories
{
mavenCentral()
}
dependencies
{
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
dependencies
{
compile 'com.android.support:appcompat-v7:20.0.+'
compile 'com.android.support:support-v4:20.0.+'
compile 'com.google.android.gms:play-services:+'
}
android
{
compileSdkVersion 21
buildToolsVersion '21.0.0'
defaultConfig
{
minSdkVersion 14
targetSdkVersion 23
}
productFlavors { }
}
你可以發佈你的gradle文件嗎? – varunkr
應用插件: '機器人庫' 庫{ mavenCentral() } buildscript { 庫{ mavenCentral() } 依賴性{ 類路徑「com.android.tools.build:gradle:1.0 0.0' } } 依賴性{ 編譯 'com.android.support:appcompat-v7:20.0.+' 編譯 'com.android.support:support-v4:20.0.+' 編譯「融爲一體。 google.android.gms:play-services:+' } 的Android { compileSdkVersion 21 buildToolsVersion '21 .0.0' defaultConfig { 的minSdkVersion 14 targetSdkVersion 23 } productFlavors {} } –