我的Android应用程序与Google Game Services项目相关联,该项目在几天前一直有效。 但是,现在它的错误率是100%。每个请求都失败了。 这不是我的申请。实际上,即使我尝试在Play游戏上打开排行榜,也会出现错误。
我不想创建另一个应用程序,所以我想解决它。 我该怎么办?
例如,我在Play游戏中有一个排行榜,但在Play游戏应用程序(Android内的应用程序)中无法打开。
在我开发的应用程序中,它是相同的,我尝试用代码打开排行榜:
Games.getLeaderboardsClient(MyApplication.getAppContext(), GoogleSignIn.getLastSignedInAccount(this))
.getLeaderboardIntent(getString(R.string.leaderboard_id))
.addOnSuccessListener(new OnSuccessListener<Intent>() {
@Override
public void onSuccess(Intent intent) {
Log.d("LeaderBoard","onSuccess");
startActivityForResult(intent, RC_LEADERBOARD_UI);
}
}).addOnFailureListener(new OnFailureListener(){
@Override
public void onFailure(@NonNull Exception e) {
Log.d("LeaderBoard",e.toString());
Toast.makeText(thisActivity, "Failed to open the leaderboard.", Toast.LENGTH_SHORT).show();
}
});
只需打开蓝屏两秒即可关闭而不显示任何排行榜。
我尝试创建一个新的排行榜,这个排行榜已经成功创建,但在我尝试为其添加分数后,它开始发生同样的情况:
Games.getLeaderboardsClient(this, GoogleSignIn.getLastSignedInAccount(this))
.submitScore(getString(R.string.leaderboard_id), score);
这些代码之前正在运作。它没有任何明显的原因就停止了工作。
&LT;&LT;关于该项目的信息&gt;&gt;
gradle这个(项目)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
//classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.google.com"
}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
的gradle(模块)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.cerveja.qof.pedro.qof_cerveja"
minSdkVersion 16
targetSdkVersion 27
versionCode 13
versionName "2.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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'
}
)
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:27.0.2'
//
//
//compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services-ads:11.8.0'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.google.android.gms:play-services-games:11.8.0'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.facebook.android:facebook-login:[4,5)'
compile 'com.facebook.android:facebook-share:[4,5)'
//compile 'com.google.firebase:firebase-core:11.6.2'
//compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'net.zetetic:android-database-sqlcipher:3.5.9@aar'
testCompile 'junit:junit:4.12'
implementation 'com.google.ads.mediation:applovin:7.6.1.0'
implementation 'com.google.ads.mediation:inmobi:6.2.4.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:recyclerview-v7:27.0.2'
//implementation 'com.applovin:applovin-sdk:7.6.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
//implementation 'com.google.ads.mediation:chartboost:7.0.1.0'
//implementation files('libs/chartboost.jar')
implementation files('libs/applovin-sdk-7.6.2.jar')
}
apply plugin: 'com.google.gms.google-services'