以下是事实。
我只 找到一个发现同样问题的人 但他是用Unity开发游戏,而我的应用是用Android SDK做的原生Android应用,所以我不太明白他的解决方案。
我不会输入关于控制台设置和SHA1键以及链接应用等这些东西的截图,因为正如我所说。工作版和非工作版的唯一区别是,非工作版已经做成了安卓应用捆绑包,而不是apk。 所以集成是正确的。
可悲的是我的apk超过了100MB,所以Google Play不让我上传了,我只能应用捆绑。
将我的应用制作成一个 应用捆绑不知何故使谷歌游戏整合中断。
任何想法?
E D I T。
As requested, here is the gradle.properties 文件。
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m
Gradle:
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:
我生成的apk 捆绑工具 的应用程序捆绑,它也完美地工作。这意味着Google Play商店对我的应用捆绑做了一些事情,杀死了Google Play游戏的集成。
我看到Google Play又用我的发行密钥重新签署了应用,这可能是一个问题吗?
谷歌所做的是对从App Bundle生成的APK进行签名。
你用App Bundle签署的release keystore实际上只被Google用来验证文物的来源。提供给用户的是用一个叫做 "应用签名密钥 "的密钥签名的APK。
如果你进入Play Console中的 "App Signing "页面,你就可以找到? 上传证书 (对应于您的发行密钥库)和 应用程序签名证书.
复制应用签名证书的SHA-1。
然后,你是否在Play Console的 "游戏服务 "栏目中注册了你的游戏?如果是,进入 "关联应用",选择 "安卓",填写包名等详细信息后,会要求你输入SHA-1来创建客户端ID。
在里面粘贴之前复制的SHA-1。
希望能帮到你。