Android Logcat:未找到Google Play服务资源。检查您的项目配置以确保包含资源
日志: 08-06 14:07:01.005 8404-8648/com.metabrain.emre E/GooglePlayServicesUtil:Google Play服务资源未被删除 建立检查项目配置以确保资源 包括在内。 08-06 14:07:01.795 8404-8690/com.metabrain.emre E/libEGL:validate_显示:255错误3008(EGL_坏显示) 08-06 14:07:06.246 8404-8404/com.metabrain.emre E/UncaughtException:java.lang.RuntimeException:Failure 结果ResultInfo{who=null,request=9001,result=10002,data=Intent{ (有额外的)}}}到活动 {com.metabrain.emre/com.metabrain.emre.Main_Activity}: java.lang.NullPointerException:尝试调用虚拟方法“void” 空对象引用上的android.app.Dialog.show() 在android.app.ActivityThread.deliverResults上(ActivityThread.java:3636) 在 android.app.ActivityThread.handleSendResult(ActivityThread.java:3679) 在android.app.ActivityThread.access$1300(ActivityThread.java:151) 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) 位于android.os.Handler.dispatchMessage(Handler.java:102) 位于android.os.Looper.loop(Looper.java:135) 位于android.app.ActivityThread.main(ActivityThread.java:5354) 位于java.lang.reflect.Method.invoke(本机方法) 位于java.lang.reflect.Method.invoke(Method.java:372) 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) 位于com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) 原因:java.lang.NullPointerException:尝试调用虚拟机 空对象引用上的方法“void android.app.Dialog.show()” 在 com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:950) 在 com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:931) 在 com.google.example.games.basegameutils.GameHelper.giveUp(GameHelper.java:909) 在 com.google.example.games.basegameutils.GameHelper.onActivityResult(GameHelper.java:615) 在 com.google.example.games.basegameutils.BaseGameActivity.onActivityResult(BaseGameActivity.java:123) 位于android.app.Activity.dispatchActivityResult(Activity.java:6223) 位于android.app.ActivityThread.deliverResults(ActivityThread.java:3632) 在 android.app.ActivityThread.handleSendResult(ActivityThread.java:3679) 在android.app.ActivityThread.access$1300(ActivityThread.java:151) 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) 位于android.os.Handler.dispatchMessage(Handler.java:102) 位于android.os.Looper.loop(Looper.java:135) 位于android.app.ActivityThread.main(ActivityThread.java:5354) 位于java.lang.reflect.Method.invoke(本机方法) 位于java.lang.reflect.Method.invoke(Method.java:372) 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) 位于com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) 08-06 14:07:06.539 8404-8404/com.metabrain.emre E/AndroidRuntime:致命异常:主 进程:com.metabrain.emre,PID:8404 java.lang.RuntimeException:传递结果失败 ResultInfo{who=null,request=9001,result=10002,data=Intent{(has) 附加)}}}到活动 {com.metabrain.emre/com.metabrain.emre.Main_Activity}: java.lang.NullPointerException:尝试调用虚拟方法“void” 空对象引用上的android.app.Dialog.show() 在android.app.ActivityThread.deliverResults(ActiviAndroid Logcat:未找到Google Play服务资源。检查您的项目配置以确保包含资源,android,google-play-services,google-play-games,google-play-developer-api,google-play-console,Android,Google Play Services,Google Play Games,Google Play Developer Api,Google Play Console,日志: 08-06 14:07:01.005 8404-8648/com.metabrain.emre E/GooglePlayServicesUtil:Google Play服务资源未被删除 建立检查项目配置以确保资源 包括在内。 08-06 14:07:01.795 8404-8690/com.metabrain.emre E/libEGL:validate_显示:255错误3008(EGL_坏显示) 08-06 14:07:06.246 8404-8404/com.metabrain.em
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
...
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
compile 'com.google.firebase:firebase-core:10.2.0'
})
compile 'com.android.support:appcompat-v7:25.3.1'
...
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-games:10.2.0'
compile 'com.google.android.gms:play-services-plus:10.2.0'
}
apply plugin: 'com.google.gms.google-services'