什么是“我们检测到您的应用正在使用旧版本的Google Play开发者API"? Google Developer Console中出现警告? [英] What is "We’ve detected that your app is using an old version of the Google Play developer API" warning in Google Developer Console?

查看:161
本文介绍了什么是“我们检测到您的应用正在使用旧版本的Google Play开发者API"? Google Developer Console中出现警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们没有明确使用任何Google Play开发者API,但我们收到以下警告:

这与 https://developer.android.com/google/play/相关吗billing/billing_library_releases_notes 吗?

我们当前正在使用 Google Play计费库1.2.2版本(2019-03-07)

我们不打算迁移 Google Play Billing Library 2.0.1版本(2019-06-06),因为这会花费很多精力,而且收益不大.

必须在三天内确认购买

但这只是我的大胆猜测-Google Play结算库与Google Play开发者API相关.它们可能彼此关联,也可能彼此不关联.

我们检测到您的应用正在使用旧版本的Google Play开发者API"是什么意思?

以下是我们完整的依赖项.您知道导致此警告的原因是什么吗?

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])


    implementation 'com.android.billingclient:billing:1.2.2'


    implementation 'androidx.multidex:multidex:2.0.1'


    def lifecycle_version = '2.0.0-beta01'
    // ViewModel and LiveData
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"


    // alternately - if using Java8, use the following instead of compiler
    implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"


    def room_version = '2.1.0'
    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"

    def work_version = "2.1.0"
    implementation "androidx.work:work-runtime:$work_version"

    // https://github.com/yccheok/SmoothProgressBar
    implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'

    // For Google Drive REST API - https://github.com/gsuitedevs/android-samples/blob/master/drive/deprecation/app/build.gradle
    implementation('com.google.http-client:google-http-client-gson:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.api-client:google-api-client-android:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
        exclude group: 'org.apache.httpcomponents'
    }

    implementation 'com.google.firebase:firebase-messaging:19.0.1'

    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
    implementation 'androidx.preference:preference:1.1.0-beta01'
    implementation 'com.google.android.material:material:1.1.0-alpha07'

    implementation 'androidx.exifinterface:exifinterface:1.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.5'

    implementation 'com.github.yccheok:AndroidDraw:0.18'
    implementation 'com.github.yccheok:SectionedRecyclerViewAdapter:0.4'
    implementation 'com.github.yccheok:CalendarView:1.10'

    implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'

    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'

    implementation 'com.github.yccheok:PhotoView:0.1'

    implementation 'com.github.yccheok:Matisse:1.6'

    implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1'

    // https://github.com/romandanylyk/PageIndicatorView
    implementation 'com.romandanylyk:pageindicatorview:1.0.2@aar'

    implementation 'me.zhanghai.android.materialratingbar:library:1.3.2'

    testImplementation 'junit:junit:4.12'

    testImplementation "org.robolectric:robolectric:4.2.1"
    testImplementation 'org.mockito:mockito-core:2.23.0'
    testImplementation 'org.powermock:powermock-core:2.0.0-RC.4'
    testImplementation 'org.powermock:powermock-module-junit4:2.0.0-RC.4'
    testImplementation 'org.powermock:powermock-api-mockito2:2.0.0-RC.4'

    androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
}

对于项目级别的依赖关系,是

dependencies {
    classpath 'com.android.tools.build:gradle:3.4.2'
    classpath 'com.google.gms:google-services:4.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

解决方案

问题是您的项目在Google Cloud Platform上正在使用旧版的Developer Web API.当您有意/无意地从开发者设置的Google Play控制台的 API访问部分启用了开发者服务时,便会自动为您设置该功能.

用于订阅和购买的Web API实际上是Android Developer API的一部分:

通过Google Play开发者API,您可以执行许多发布和应用管理任务.它包含两个组件:

订阅和应用内购买API可让您管理应用内购买和订阅.
通过发布API,您可以上传和发布应用程序,以及执行其他与发布相关的任务.

未在应用中使用以上API ,该API用于管理而非实际购买.您使用的SDK具有不同的版本控制,因此无需升级.但是,此API是在您的GCP项目中设置的.

要查找GCP上的哪个Project与您的Play控制台相关联,请转到以下链接: https://play.google.com/apps/publish/#ApiAccessPlace

您只需要转到GCP,找到您的项目,找到Google Android Developer API并在此处更改版本.或者,如果不使用该API,则可以禁用它.

例如,我的GCP项目被自动命名为 Google Play Android Developer ,因此您的GCP项目可能是相同的.

我在控制台上看不到任何选项,可能是因为它们为新项目删除了该选项,但是如果您的项目已经在使用旧版本,那么您可能还会收到警告.

We do not use any Google Play Developer APIs explicitly, yet we are receiving the following warning:

Is this related to https://developer.android.com/google/play/billing/billing_library_releases_notes ?

We are currently using Google Play Billing Library 1.2.2 Release (2019-03-07)

We don't plan to migrate Google Play Billing Library 2.0.1 Release (2019-06-06) because it would be a lot of work with little gain.

Purchases must be acknowledged within three days

But that is just my wild guess - that the Google Play Billing library is related to the Google Play Developer API. They may or may not be related to each other.

What does it mean by "We’ve detected that your app is using an old version of the Google Play developer API" ?

The following is the full set of our dependencies. Any idea what causes this warning?

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])


    implementation 'com.android.billingclient:billing:1.2.2'


    implementation 'androidx.multidex:multidex:2.0.1'


    def lifecycle_version = '2.0.0-beta01'
    // ViewModel and LiveData
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"


    // alternately - if using Java8, use the following instead of compiler
    implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"


    def room_version = '2.1.0'
    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"

    def work_version = "2.1.0"
    implementation "androidx.work:work-runtime:$work_version"

    // https://github.com/yccheok/SmoothProgressBar
    implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'

    // For Google Drive REST API - https://github.com/gsuitedevs/android-samples/blob/master/drive/deprecation/app/build.gradle
    implementation('com.google.http-client:google-http-client-gson:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.api-client:google-api-client-android:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
        exclude group: 'org.apache.httpcomponents'
    }

    implementation 'com.google.firebase:firebase-messaging:19.0.1'

    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
    implementation 'androidx.preference:preference:1.1.0-beta01'
    implementation 'com.google.android.material:material:1.1.0-alpha07'

    implementation 'androidx.exifinterface:exifinterface:1.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.5'

    implementation 'com.github.yccheok:AndroidDraw:0.18'
    implementation 'com.github.yccheok:SectionedRecyclerViewAdapter:0.4'
    implementation 'com.github.yccheok:CalendarView:1.10'

    implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'

    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'

    implementation 'com.github.yccheok:PhotoView:0.1'

    implementation 'com.github.yccheok:Matisse:1.6'

    implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1'

    // https://github.com/romandanylyk/PageIndicatorView
    implementation 'com.romandanylyk:pageindicatorview:1.0.2@aar'

    implementation 'me.zhanghai.android.materialratingbar:library:1.3.2'

    testImplementation 'junit:junit:4.12'

    testImplementation "org.robolectric:robolectric:4.2.1"
    testImplementation 'org.mockito:mockito-core:2.23.0'
    testImplementation 'org.powermock:powermock-core:2.0.0-RC.4'
    testImplementation 'org.powermock:powermock-module-junit4:2.0.0-RC.4'
    testImplementation 'org.powermock:powermock-api-mockito2:2.0.0-RC.4'

    androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
}

For project level dependencies, it is

dependencies {
    classpath 'com.android.tools.build:gradle:3.4.2'
    classpath 'com.google.gms:google-services:4.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

解决方案

The problem is that your project on Google Cloud Platform is using an old version of Developer Web API. It was automatically set up for you when you enabled developer services intentionally/unintentionally from Google Play Console's API Access section in Developer Settings.

Web API for subscriptions and purchases is actually part of Android Developer API:

The Google Play Developer API allows you to perform a number of publishing and app-management tasks. It includes two components:

The Subscriptions and In-App Purchases API lets you manage in-app purchases and subscriptions.
The Publishing API lets you upload and publish apps, and perform other publishing-related tasks.

You are not using above API in your app, this API is for management not the actual purchases. You are using SDK which has different versioning so no need to upgrade. This API was set up in your GCP project however.

To find which Project on GCP is associated with your Play Console, go to this link: https://play.google.com/apps/publish/#ApiAccessPlace

You just need to Go to GCP, find your project, find Google Android Developer API and change the version there. Or you can just disable the API if you don't use it.

For example, my GCP project was automatically named Google Play Android Developer so yours might probably be the same.

I can't see an option on my console probably because they removed it for new projects, but if your project is already using an old version, you probably will have a warning there as well.

这篇关于什么是“我们检测到您的应用正在使用旧版本的Google Play开发者API"? Google Developer Console中出现警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆