Google Developer Console中的“我们检测到您的应用程序正在使用旧版本的Google Play开发者API”警告是什么?

Che*_*eng 54 android google-api-java-client google-developers-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'
}
Run Code Online (Sandbox Code Playgroud)

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

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
}
Run Code Online (Sandbox Code Playgroud)

Zoh*_*mir 16

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

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

Google Play开发者API允许您执行许多发布和应用管理任务。它包括两个组件:

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

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

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

在此处输入图片说明

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

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

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

在此处输入图片说明

  • @ MaximeTremblay-Savard **如果没有迁移的选项**,则从Play商店取消链接,删除Google云上的项目,然后将其再次链接到新项目。 (3认同)
  • 谢谢,我想知道为什么项目首先存在,但是我发现它是fastlane集成。 (2认同)

Gid*_*aya 15

有人知道吗?“ 我们检测到您的应用程序正在使用旧版本的Google Play开发者API ”是什么意思?

此消息的简单解释是:您或第三方应用程序正在点击 below api

https://www.googleapis.com/androidpublisher/v1/applications
Run Code Online (Sandbox Code Playgroud)

要么

https://www.googleapis.com/androidpublisher/v2/applications
Run Code Online (Sandbox Code Playgroud)

传递您的应用的程序包名称

com.android.myapp
Run Code Online (Sandbox Code Playgroud)

在其他方面执行自动化任务,例如

Retrieve billing Info
Publish app to store
Retrieve review comments
etc..
Run Code Online (Sandbox Code Playgroud)

尽管如此,那些API已被弃用,而是要通过以下API

https://www.googleapis.com/androidpublisher/v3/applications
Run Code Online (Sandbox Code Playgroud)

已经确认某些第三方插件会触发此消息,这仅仅是因为它们正在使用已弃用的api来执行其操作。

例如:

还有一种可能是您是从服务器端还是just maybe在自己的应用程序代码中引用已弃用的api 。底线是a call somewhere is hitting a deprecated api您应用的package name。我对您的建议是:Update your billing library if you use one

Google Developer API v3 doc中的语句包装一下

API的使用也可以是间接的,而不是通过应用程序本身,而是通过第三方插件(例如,用于推出新版本的插件)间接使用。许多第三方插件已经在使用API​​版本3。如果您使用的插件不支持版本3,则需要与维护者联系。

  • 我和OP有同样的问题,我只使用谷歌支持库作为依赖项(没有别的,没有第3方库或jar)。此外,我不使用任何 API 或 API 密钥,没有远程服务器通信,没有应用内支付,而且我的应用程序可以离线工作,因此无法访问互联网。我仍然收到警告,为什么?我认为那不可能,这一定是错误的警告 (2认同)

Ama*_*aur 0

根据谷歌文档,您不能像文档中那样使用 Google Play 开发人员版本 1 和 2,他们提到他们正在迁移到版本 3,并且应用内计费直接与此链接。

检查第一个链接以阅读它
1. https://android-developers.googleblog.com/2019/03/changes-to-google-play-developer-api.html

要了解Google Play 开发者 API,
请查看https://developers.google.com/android-publisher/

用于实现版本 3
1. https://github.com/googlesamples/android-play-publisher-api/tree/master/v3/java
2. https://developers.google.com/api-client-library/java /apis/androidpublisher/v3

希望对你有帮助。

  • 没有简单的方法可以找到导致它的原因,该博客明确表示该警告也可能存在,因为“API 的使用也可以是间接的,不是由应用程序本身,而是由第三方插件”。显然,OP 使用了很多库。“该消息基于过去 7 天内对 API 的所有调用,并且每天刷新”。 (2认同)