当我试图运行我的应用程序内计费我得到的错误:“这个版本的应用程序没有配置通过谷歌播放计费。查看帮助中心获取更多信息”。

我已经在Manifest文件中有计费权限,我有一个签名的。apk作为草稿上传到谷歌Play上,我也已经在我的手机上安装了相同的签名apk。

有什么帮助可以解决这个问题吗?


当前回答

让我补充一下发生在我身上的事,也许能帮到别人。

这主要是由于签约。

由于我已经在Project结构中添加了签名细节,所以我认为每次运行时,都安装了期望的签名apk。但是选择了“调试”构建类型。

下面的修复为我解决了问题。

生成构建类型为“release”的签名apk。 手动安装apk。

其他回答

这里没有提到的另一个原因是,您需要在真正的设备上进行测试。 随着模拟器变得越来越好,这是一个很容易犯的错误。

最近谷歌对他们的系统进行了更改,因为你已经上传了至少一个APK到你的控制台,你可以用你的应用程序测试你的应用内请求,使用任何版本代码/号码。

交叉参考LINK

配置gradle为调试版本签名。

android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            storeFile file("my-release-key.jks")
            storePassword "password"
            keyAlias "my-alias"
            keyPassword "password"
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.release
            ...
        }
    }
}

2022答:

这是测试调试/发布版本&如果应用程序是由Play签名(这意味着从谷歌Play交付的应用程序的签名证书与使用Android Studio从您的机器安装应用程序时的证书不同)。

检查以下步骤:

Create your product on Google Play Console and activate it. Add license testers (open the Google Play Console -> Settings -> License Testing). Add all the Google accounts listed on your android device. Upload signed app to the internal testing track (it must be in release mode). Use the testing link to check if the app is available to download (make sure the uploaded app version to the internal track matches the version you're testing in debug mode). It takes some time to see the latest uploaded version there, so I recommend clearing the cache of the Play Store app. Run your app in debug mode from Android Studio. (Again, the app version and build number must match the values on the published version to the internal track).

我在两个不同的谷歌Play Console帐户(两个不同的应用程序)上进行了测试,它是有效的。

啊,经过几个小时的尝试,终于找到了解决方案。

谷歌需要一段时间来处理应用程序并将它们更新到服务器,对我来说大约需要半天。因此,在谷歌Play上以草稿形式保存apk后,你必须等待几个小时,应用内产品才能正常响应,并允许定期购买。 导出并签署APK。未签名的APK试图进行购买将得到错误。

你需要用你的实际证书签署APK。然后将其安装到测试设备上。然后您可以测试InAppBilling。如果您正在通过eclipse直接运行到设备(在调试模式下)来测试应用程序,那么您将得到这个错误。

如果你使用android.test. bought作为SKU,它会一直工作,但是在你的最终响应中不会有developerPayload。

如果你使用的是你自己的应用项目草稿,你可以一直测试,但你会被收费,所以之后你必须自己退款。

您不能使用用于谷歌游戏开发控制台的相同gmail帐户购买物品。