问题描述
以下是事实:
- 我的游戏应用 100%使用调试密钥库使用Google Play游戏签名的APK,可以登录,解锁成就.
- 我的游戏应用正在 100%与发布密钥库一起使用,已使用Google Play游戏签名过apk,可以登录并解锁成就.
- 每当我尝试使用应用捆绑包而不是apk使用我的应用登录我的Google Play游戏时,我都会得到 SIGN_IN_REQUIRED 错误,这很愚蠢,考虑到我确实想登录.
- My game app is 100% working with debug keystore signed apk using Google Play Games, can sign in, unlock achievements.
- My game app is 100% working with release keystore signed apk using Google Play Games, can sign in, unlock achievements.
- Whenever I try to sign in to Google Play Games with my app using app bundle instead of apk, I get SIGN_IN_REQUIRED error, which is stupid on its own, considering I literally want to sign in.
我仅找到了一个发现相同问题的人,但是他正在Unity中开发游戏,而我的应用是使用Android SDK开发的原生Android应用,所以我真的没有得到他的解决方案.
I only found one guy who found the same issue but he is developing his game in Unity, and my app is a native Android app made with Android SDK, so I don't really get his solution.
我不会输入有关控制台设置,SHA1键和链接的应用程序以及所有这些内容的屏幕截图,因为正如我说的那样,工作版本与不工作版本之间的唯一区别是,不工作版本具有设置为android应用程序包,而不是apk.
I won't input screenshots about console settings and SHA1 keys and linked apps and all about those things because as I said, the only difference between the working versions and the not working version is that the not working version has been made to an android app bundle, instead of an apk, so the integrations is correct.
可悲的是,我的apk超过100 MB,因此Google Play不再允许我上传它,我必须进行应用捆绑.
The sad thing is that my apk is more than 100 MB so Google Play doesn't let me upload it anymore, I have to app bundle.
将我的应用制作成应用捆绑包的过程使Google Play游戏集成中断.
有什么想法吗?
E D I T:
根据要求,这是 gradle.properties 文件:
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m
等级:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
android {
dexOptions {
javaMaxHeapSize "4g"
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
multiDexEnabled true
minSdkVersion 17
targetSdkVersion 28
applicationId 'hu.mydomain.myappname'
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "game"
productFlavors {
flavor_name {
dimension "game"
applicationIdSuffix ".suffixflavor"
versionCode 350
versionName "2.2.5_getymo"
}
other_flavor {
dimension "game"
applicationIdSuffix ".othersuffixflavor"
versionCode 1
versionName "1.0.0"
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.31.1'
}
}
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
google()
maven {
url "https://applovin.bintray.com/Android-Adapter-SDKs"
}
maven {
url 'https://dl.bintray.com/ironsource-mobile/android-sdk'
}
maven {
url "https://chartboostmobile.bintray.com/Chartboost"
}
maven {
url "https://s3.amazonaws.com/smaato-sdk-releases/"
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.crashlytics.sdk.android:crashlytics:2.9.8@aar') {
transitive = true;
}
implementation('com.crashlytics.sdk.android:answers:1.4.6@aar') {
transitive = true;
}
implementation 'com.android.billingclient:billing:1.2'
implementation 'com.makeramen:roundedimageview:2.2.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.squareup.okio:okio:1.13.0'
implementation("com.squareup.okhttp3:okhttp:3.14.1")
implementation 'com.github.javiersantos:PiracyChecker:1.2.3'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.google.android.gms:play-services-base:17.2.1'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
implementation 'com.google.android.gms:play-services-basement:17.2.1'
implementation 'com.yodo1:advert-gp:3.7.0'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'com.google.android.gms:play-services-games:19.0.0'
implementation 'com.google.firebase:firebase-ads:19.1.0'
implementation 'com.google.firebase:firebase-core:17.4.0'
}
E D I T 2:
我从应用程序包中使用 bundletool 生成了apk完美地工作.这意味着Google Play商店会对我的应用程序捆绑包执行某些操作,从而终止了Google Play游戏集成.
I generated the apk with bundletool from the app bundle and it also works perfectly. That means that Google Play Store do something with my app bundle which kills the Google Play Games integration.
我看到Google Play用我的释放密钥再次对应用进行了重新签名,这有问题吗?
I see that Google Play re-signs the app again with my release key, can this be a problem?
推荐答案
Google正在做的工作是对从应用程序捆绑包中生成的APK进行签名.
What Google is doing is signing the APKs that it generates from the App Bundle.
您用来签署App Bundle的发行密钥库仅由Google有效地用于验证工件的来源.为用户提供的服务是使用称为应用程序签名密钥"的密钥对APK进行签名.
The release keystore you sign your App Bundle with is effectively only used by Google to authenticate the origin of the artifact. What is served to users are APKs signed with a key called the "app signing key".
如果您转到Play控制台中的应用程序签名"页面,则可以找到上传证书(与您的发行密钥库相对应)和应用程序签名证书.
If you go to the "App Signing" page in the Play Console, you will be able to find the upload certificate (which corresponds to your release keystore) and the app signing certificate.
复制应用程序签名证书的SHA-1.
然后,您是否在游戏服务"部分的Play控制台中注册了游戏?如果是这样,请转到链接的应用程序",选择"Android",然后填写软件包名称等详细信息,然后将要求您输入SHA-1来创建客户端ID.
Then, did you register your game in the Play Console in the "Game services" section? If so, go to "Linked apps", select "Android" and after filling the details of package name etc., you'll be asked to enter the SHA-1 to create the Client ID.
在其中粘贴先前复制的SHA-1.
希望有帮助.
这篇关于Android App Bundle终止了Google Play游戏的集成-使用纯旧的APK-如何解决此问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!