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

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

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


当前回答

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帐户(两个不同的应用程序)上进行了测试,它是有效的。

其他回答

如果你发布的版本与你在手机上测试的版本不一样,也会发生同样的情况。

例如,上传的版本是android:versionCode="1",而你在你的手机上测试的版本是android:versionCode="2"

如果你使用的apk版本与谷歌比赛中的apk版本不同,就会发生这种情况。

当你在上传apk后添加了应用内购买,但你还没有在play store中发布应用(alpha, beta和产品)时,也会出现这个问题。

这基本上意味着,在你将apk发布到Play商店后(alpha, beta和成品),你必须添加应用内购买。否则你将无法购买或查询应用内购买。

如果你想调试IAB,你需要做的是:

提交到谷歌播放你的应用程序的版本与IAB的权限清单: 在谷歌播放上添加一个产品到您的应用程序:管理应用程序内计费 设置有签名的自定义调试密钥库:将Eclipse配置为使用有签名的密钥库

最近谷歌对他们的系统进行了更改,因为你已经上传了至少一个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
            ...
        }
    }
}