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'
Logcat: 08-06 14:07:01.005 8404-8648/com.metabrain.emre E/GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 08-06 14:07:01.795 8404-8690/com.metabrain.emre E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) 08-06 14:07:06.246 8404-8404/com.metabrain.emre E/UncaughtException: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9001, result=10002, data=Intent { (has extras) }} to activity {com.metabrain.emre/com.metabrain.emre.Main_Activity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.show()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3636) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3679) at android.app.ActivityThread.access$1300(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5354) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.show()' on a null object reference at com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:950) at com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:931) at com.google.example.games.basegameutils.GameHelper.giveUp(GameHelper.java:909) at com.google.example.games.basegameutils.GameHelper.onActivityResult(GameHelper.java:615) at com.google.example.games.basegameutils.BaseGameActivity.onActivityResult(BaseGameActivity.java:123) at android.app.Activity.dispatchActivityResult(Activity.java:6223) at android.app.ActivityThread.deliverResults(ActivityThread.java:3632) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3679) at android.app.ActivityThread.access$1300(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5354) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) 08-06 14:07:06.539 8404-8404/com.metabrain.emre E/AndroidRuntime: FATAL EXCEPTION: main Process: com.metabrain.emre, PID: 8404 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9001, result=10002, data=Intent { (has extras) }} to activity {com.metabrain.emre/com.metabrain.emre.Main_Activity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.show()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3636) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3679) at android.app.ActivityThread.access$1300(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5354) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.show()' on a null object reference at com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:950) at com.google.example.games.basegameutils.GameHelper.showFailureDialog(GameHelper.java:931) at com.google.example.games.basegameutils.GameHelper.giveUp(GameHelper.java:909) at com.google.example.games.basegameutils.GameHelper.onActivityResult(GameHelper.java:615) at com.google.example.games.basegameutils.BaseGameActivity.onActivityResult(BaseGameActivity.java:123) at android.app.Activity.dispatchActivityResult(Activity.java:6223) at android.app.ActivityThread.deliverResults(ActivityThread.java:3632) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3679) at android.app.ActivityThread.access$1300(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5354) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)