Android:如何使用应用内计费更新 Android 应用? [英] Android: how to update an Android app with inapp billing?

查看:19
本文介绍了Android:如何使用应用内计费更新 Android 应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一种提问方式:如何使应用内计费适用于我的应用的所有版本?

Another way to ask the question: how to make inapp billing working with all versions of my app?

我有一个应用内计费的应用.我要更新它.

I have got an app with inapp billing. I want to update it.

我在开发者控制台上的活动 apk 是版本 1.我的问题如下:

My active apk on the developer console is in version 1. My problem is the following:

  • 当我使用 adb 在我的设备上安装更新的应用程序(签名包)版本 2 时,我收到以下消息:此版本的应用程序包未配置为市场计费"
  • 当我在我的设备上安装版本 1(与控制台上的版本相同)的更新应用程序(始终签名的程序包)时(我在控制台上无法执行的操作...我必须增加版本号!)使用 adb,一切正常...

因此,应用内计费似乎仅适用于应用的一个版本:在控制台中处于活动状态的应用.我想我的用户会遇到同样的问题:只有最后一次更新应用的用户才能执行应用内计费......其他人会收到错误.

Consequently, it seems that inapp billing works only with one version of the app: the one which is active in the console. I imagine that my users will have the same issue: only the users with the last update of the app will be able to perform inapp billing...the others will get the error.

有人知道如何解决这个问题吗?我怎样才能使我在世界上已经安装的所有应用都能够进行应用内计费,无论版本号是什么??

Anybody knows how to solve this issue ? How can I do so that all my apps already installed in the world will be able to do inapp billing whatever the version number is ??

谢谢!!!

推荐答案

您所说的控制台"是指发布者的帐户吗?

By "console" do you mean your publisher's account?

我认为这不是错误,而是设计的功能.如果您尝试购买 没有 4 个 android.test.* 项目 ID 之一的购买,并且 它正在运行调试版本甚至比您发布的版本更新的发布版本,您将收到此错误:

I think this isn't a bug but a feature by design. If you attempt to make a purchase that doesn't have one of the 4 android.test.* item ids, and it is running a debug version or even a release version that is newer than the one you have published, you will receive this error:

例如,如果您在您的设备上运行 Release 模式,该模式比市场上的版本高一个版本并且您尝试购买 真正的 项(不是 android.test.* 项),您将收到上述错误.

For example, if you're running on your device a Release mode that's one version higher than what's in the Market and you try to purchase a real item (not an android.test.* one), you will get the aforementioned error.

进一步澄清:如果您运行的应用程序的 versionCode 高于 AndroidMarket 中的应用程序(当然具有相同的包名称),如果您 成功购买"使用 4 个 android.test.* 项目 ID 之一.

To further clarify: If you run an application of a higher versionCode than the one in the AndroidMarket (with the same package name, of course) it will succeed in "making the purchase" if you use one of the 4 android.test.* item ids.

请注意,这是基于我自己的经验和观察,因为关于这方面的完整文档还有待改进.

Please note that this is based on my own experience and observation as full documentation on this leaves something to be desired.

这篇关于Android:如何使用应用内计费更新 Android 应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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