Android App Bundle kills Google Play Games 集成 - 使用普通的旧 APK - 我该如何解决这个问题?

Android App Bundle kills Google Play Games integration - Working with plain old APK - How can I fix this?

事实如下:

我只 found one guy who found the same issue 但他正在 Unity 开发他的游戏,而我的应用程序是使用 Android SDK 制作的原生 Android 应用程序,所以我不太了解他的解决方案。

我不会输入有关控制台设置和 SHA1 密钥以及链接的应用程序以及所有这些东西的屏幕截图,因为正如我所说,工作版本和不工作版本之间的唯一区别是android 应用程序包而不是 apk, 已制作了无效版本,因此集成是正确的。

遗憾的是我的 apk 超过 100 MB,所以 Google Play 不再让我上传它,我必须应用程序包。

将我的应用程序制作成 应用程序包的过程不知何故导致 Google Play 游戏集成中断。

有什么想法吗?

编辑:

根据要求,这里是 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'
}

编辑 2:

我从应用程序包中使用 bundletool 生成了 apk,它也可以完美运行。这意味着 Google Play 商店对我的应用程序包做了一些事情,这会破坏 Google Play 游戏集成。

我看到 Google Play 使用我的发布密钥再次对应用程序重新签名,这会是个问题吗?

Google 正在对它从 App Bundle 生成的 APK 进行签名。

您签署 App Bundle 所用的发布密钥库实际上仅供 Google 用来验证工件的来源。提供给用户的是使用名为 "app signing key".

的密钥签名的 APK。

如果您转到 Play 管理中心的 "App Signing" 页面,您将能够找到 上传证书(对应于您的发布密钥库)和应用签名证书

复制应用签名证书的 SHA-1。

那么,您是否在 "Game services" 部分的 Play 控制台中注册了您的游戏?如果是这样,请转到 "Linked apps"、select "Android" 并在填写包名称等详细信息后,系统会要求您输入 SHA-1 以创建客户端 ID。

在那里,粘贴之前复制的 SHA-1。

希望对您有所帮助。