Android:如何使用应用内计费更新 Android 应用?
提出问题的另一种方式:如何使应用内计费适用于我的应用程序的所有版本?
我有一个应用程序内计费的应用程序。我想更新它。
我在开发者控制台上的活动 apk 是版本 1。我的问题如下:
- 当我使用 adb 在我的设备上安装版本 2 中更新的应用程序(签名包)时,我收到以下消息:“此版本的应用程序包 未配置市场计费(
- 当我在我的设备上安装版本 1(与控制台上的版本相同)的更新应用程序(始终签名包)时, 我无法在控制台上执行此操作...我必须增加版本号!)使用 adb,一切都有效...
因此,应用内计费似乎仅适用于该应用程序的一个版本:在控制台中处于活动状态的版本。我想我的用户也会遇到同样的问题:只有最后一次更新应用程序的用户才能执行应用程序内计费...其他人会收到错误。
有人知道如何解决这个问题吗?我怎样才能使我在世界上已安装的所有应用程序都能够进行应用程序内计费,无论版本号是什么?
谢谢 !!!
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.
My active apk on the developer console is in version 1. My problem is the following:
- when I install my updated app (signed package) in version 2 on my device using adb, I get the following message: "This version of the application package is not configured for Market billing"
- when I install my updated app (always signed package) in version 1 (same version as the one on the console) on my device (what I can't do on the console...I have to increase the version number !) using adb, verything works...
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 ??
Thanks !!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
“控制台”是指您的发布商帐户吗?
我认为这不是一个错误,而是设计的一个功能。如果您尝试进行的购买不有 4 个
android.test.*
商品 ID 之一,并且它正在运行调试版本,甚至是比您发布的版本更新的发布版本,您将收到此错误:例如,如果您在设备上运行的发布模式比市场上的版本高一个版本并且您尝试购买真实商品(不是一个
android.test.*
之一),您将收到上述错误。进一步澄清:如果您运行的应用程序的 versionCode 高于 AndroidMarket 中的应用程序(当然,具有相同的包名称),那么如果您使用以下之一,它将成功“进行购买” 4 个
android.test.*
项目 ID。请注意,这是基于我自己的经验和观察,因为关于此的完整文档还有一些不足之处。
By "console" do you mean your publisher's account?
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: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.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.
以下是我在使用应用内结算时观察到的情况。
当您上传您的发布 apk 时(无论 Alpha/Beta/Production),IAB 不会立即运行,您必须等待几个小时才能运行
上传新版本的apk(更高版本)也会一样。您必须等待几个小时才能最终发挥作用。不过,带有 IAB 的旧版本仍然可以工作。我通常做的是将我的发布 apk 作为 Beta 上传,等待几个小时,然后当它已经可以工作时,将 apk 推广到生产环境。
Here is what I have observed while using In-App-Billing.
When you upload your release apk (regardless of Alpha/Beta/Production), IAB will not work right away, you will have to wait for a few hours before it can work
Uploading a new version of the apk (higher version) will also be the same. You will have to wait for a few hours for it to eventually work. The older version with IAB will still work though. What I usually do is to upload my release apk as Beta, wait a few hours, then when it is already working, promote the apk to production.
我面临这个错误。解决方案:请上传签名apk并使用您的产品id:com.test.purchased进行测试,并将其设置为应用内产品。
(1)使用带有sign apk的export在您的手机上运行。
(2)如果发生错误,请等待 1-2 小时,因为有时 google 响应较晚。
i face this error. solution:please upload sign apk and test with your Product id:com.test.purchased and set as a in-app product.
(1)run on your mobile using export with sign apk .
(2)if error is occur then wait 1-2 hours because sometime google take response late.