在应用程序内结算,不能使RESULT_DEVELOPER_ERROR消失能使、应用程序、RESULT_DEVELOPER_ERROR

2023-09-08 09:12:49 作者:归途的路

我试图让应用内结算工作的机器人,但不断收到在尝试初始化事务以下logcat的输出:

  //从logcat中,BillingService有:
结算服务连接
CheckBillingSupported
CheckBillingSupported响应code:RESULT_OK
RestoreTransactions
   restoreTransactions收到RESULT_OK
     请求ID:12345
     请求ID:-1
handleCommand()动作:com.android.vending.billing.RESPONSE_ code]。
RestoreTransactions:RESULT_DEVELOPER_ERROR
 

我的设置:

我在清单计费的许可。 的结算服务,并接收在清单中定义。 在我的应用程序的未发布,我只是有一个向上草案。 在我创建了一个单一的应用程序内的项目,并公布了。 在我有一个测试账号添加,但不知道它使在这一点上的差异。 无论是在市场上的apk文件草案,并在我的手机的apk文件进行签名与同一个键释放模式,并具有相同的版本code。

我已经得到了应用内购买在其他应用程序的工作,但在这种情况下,我已经有一个版本发布的应用程序中。在此情况下(如上文#3),我从来没有发布的APK一次。难道我们要发布的应用程序,一旦这个工作?我认为不是,

感谢

解决方案

您不必发表了关于谷歌的应用程序中播放,足以草稿。

你所提到的6点是好的,但我想你需要检查额外的要求中提到的文档:

  RESULT_DEVELOPER_ERROR:
 
Ghostnote2 文件备忘应用

  

表示一个应用程序试图让一个应用内结算   请求,但申请并未宣布   com.android.vending.BILLING许可在其清单。也能   指示应用程序未签妥,或者你发送   一个畸形的请求,如缺失捆绑按键或请求   要求使用了无法识别的请求类型。

I'm trying to get in-app billing working on android, but keep getting the following logcat output upon trying to initialize transactions:

// from logcat, BillingService:
Billing service connected
CheckBillingSupported
CheckBillingSupported response code: RESULT_OK
RestoreTransactions 
   restoreTransactions received RESULT_OK
     request id: 12345
     request id: -1
handleCommand() action: [com.android.vending.billing.RESPONSE_CODE].
RestoreTransactions: RESULT_DEVELOPER_ERROR

My setup:

I have the billing permission in the manifest. The billing service and receiver are defined in the manifest. My app is not published, I just have a draft up. I created a single in-app item, and published it. I have a test account added, but not sure that it makes a difference at this point. Both the draft apk in marketplace, and the apk on my phone are signed in release mode with the same key and have the same versionCode.

I've gotten in-app purchases to work in another app, but in that case I already had a version of the app published. In this case (as mentioned in #3), I've never published the apk once. Do we have to publish the app once for this to work? I'd assume not,

Thanks

解决方案

You don't need to have the app published on Google Play, a draft is enough.

The 6 points you've mentioned are ok but I guess you need to check extra requirements as mentioned in the doc:

RESULT_DEVELOPER_ERROR:

Indicates that an application is trying to make an in-app billing request but the application has not declared the com.android.vending.BILLING permission in its manifest. Can also indicate that an application is not properly signed, or that you sent a malformed request, such as a request with missing Bundle keys or a request that uses an unrecognized request type.