Android应用捆绑包扼杀了Google Play Games集成-使用普通的旧APK-我如何解决这个问题?

Android应用捆绑包扼杀了Google Play Games集成-使用普通的旧APK-我如何解决这个问题?,android,google-play-games,android-app-bundle,Android,Google Play Games,Android App Bundle,事实如下: 我的游戏应用程序是100%与调试密钥库签署的apk使用谷歌玩游戏,可以登录,解锁成就。 我的游戏应用程序100%使用Google Play Games与发布密钥库签名的apk一起工作,可以登录,解锁成就。 每当我尝试使用app bundle而不是apk登录Google玩游戏时,我都会遇到错误,考虑到我确实想登录,这本身就是愚蠢的。 我只知道,但他正在Unity开发他的游戏,而我的应用程序是用Android SDK制作的本地Android应用程序,所以我没有真正了解他的解决方案 我不会

事实如下:

我的游戏应用程序是100%与调试密钥库签署的apk使用谷歌玩游戏,可以登录,解锁成就。 我的游戏应用程序100%使用Google Play Games与发布密钥库签名的apk一起工作,可以登录,解锁成就。 每当我尝试使用app bundle而不是apk登录Google玩游戏时,我都会遇到错误,考虑到我确实想登录,这本身就是愚蠢的。 我只知道,但他正在Unity开发他的游戏,而我的应用程序是用Android SDK制作的本地Android应用程序,所以我没有真正了解他的解决方案

我不会输入关于控制台设置、SHA1键和链接应用程序以及所有这些内容的屏幕截图,因为正如我所说的,工作版本和不工作版本之间的唯一区别是,不工作的版本是安卓应用程序捆绑包,而不是apk,所以集成是正确的

可悲的是,我的apk超过100MB,所以Google Play不再允许我上传它,我不得不将其应用捆绑

将我的应用程序打包成应用程序包的过程不知何故破坏了Google Play Games的集成

有什么想法吗

电子数据交换:

根据要求,以下是gradle.properties文件:

格拉德尔:

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 Store对我的应用程序包做了一些事情,这扼杀了Google Play Games集成


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

Google正在做的是对从应用程序包生成的APK进行签名

您在应用程序包上签名时使用的发布密钥库仅被Google有效地用于验证工件的来源。向用户提供的是使用称为应用程序签名密钥的密钥签名的APK

如果您转到Play Console中的应用程序签名页面,您将能够找到与发布密钥库和应用程序签名证书相对应的上载证书

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

那么,您是否在游戏服务部分的游戏控制台中注册了您的游戏?如果是这样,请转到链接的应用程序,选择Android,在填写包名等详细信息后,您将被要求输入SHA-1以创建客户端ID

在其中,粘贴先前复制的SHA-1


希望这能有所帮助。

谷歌正在做的是签署从应用程序包生成的APK

您在应用程序包上签名时使用的发布密钥库仅被Google有效地用于验证工件的来源。向用户提供的是使用称为应用程序签名密钥的密钥签名的APK

如果您转到Play Console中的应用程序签名页面,您将能够找到与发布密钥库和应用程序签名证书相对应的上载证书

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

那么,您是否在游戏服务部分的游戏控制台中注册了您的游戏?如果是这样,请转到链接的应用程序,选择Android,在填写包名等详细信息后,您将被要求输入SHA-1以创建客户端ID

在其中,粘贴先前复制的SHA-1


希望能有帮助。

嘿,亚当!您的应用程序是否包含登录过程中使用的字符串,这些字符串存储在strings.xml中?@Mars否,仅包含常规文本。嘿,亚当!您的应用程序是否包含登录过程中使用的字符串,这些字符串存储在strings.xml中?@Mars否,仅为常规文本。@Mars是的,我知道,只需等待Stackoverflow的愚蠢冷却时间即可将其标记为答案并给予奖励。@Mars是的,我知道,只需等待Stackoverflow的愚蠢冷却,将其标记为答案并给予奖励。
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'
}