Android应用程序捆绑杀死谷歌游戏集成 - 与普通的旧APK工作 - 如何解决这个问题?

问题描述 投票:1回答:1

以下是事实。

  • 我的游戏应用是 100%使用debug keystore 使用Google Play Games签署的apk,可以登录,解锁成就。
  • 我的游戏应用是 100%的工作与释放keystore 签署apk使用谷歌游戏,可以登录,解锁成就。
  • 每当我尝试登录到谷歌游戏与 我的应用程序使用应用程序捆绑而不是apk,我得到的是 SIGN_IN_REQUIRED 错误考虑到我真的想登录,这本身就很愚蠢。

我只 找到一个发现同样问题的人 但他是用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又用我的发行密钥重新签署了应用,这可能是一个问题吗?

android google-play-games android-app-bundle
1个回答
2
投票

谷歌所做的是对从App Bundle生成的APK进行签名。

你用App Bundle签署的release keystore实际上只被Google用来验证文物的来源。提供给用户的是用一个叫做 "应用签名密钥 "的密钥签名的APK。

如果你进入Play Console中的 "App Signing "页面,你就可以找到? 上传证书 (对应于您的发行密钥库)和 应用程序签名证书.

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

然后,你是否在Play Console的 "游戏服务 "栏目中注册了你的游戏?如果是,进入 "关联应用",选择 "安卓",填写包名等详细信息后,会要求你输入SHA-1来创建客户端ID。

oauth-client-image

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

希望能帮到你。

© www.soinside.com 2019 - 2024. All rights reserved.