简体   繁体   中英

TrivialDrive showing “This version of the application is not configured for billing through …”

I am trying to run the TrivialDrive on a phone to test it. I have taken all the precautions ie Not running it on my own phone. I have checked the versions are the same. I have waited enough time for GP servers to update, etc.... Does anyone know why this is happening? Thanks.

04-20 22:26:54.860: D/dalvikvm(3960): GC_EXTERNAL_ALLOC freed 47K, 50% free 2727K/5379K, external 0K/0K, paused 22ms 04-20 22:26:54.885: D/TrivialDrive(3960): Loaded data: tank = 2 04-20 22:26:54.885: D/TrivialDrive(3960): Creating IAB helper. 04-20 22:26:54.885: D/TrivialDrive(3960): Starting setup. 04-20 22:26:54.885: D/IabHelper(3960): Starting in-app billing setup. 04-20 22:26:54.885: I/ApplicationPackageManager(3960): cscCountry is not German : XEU 04-20 22:26:54.910: D/IabHelper(3960): Billing service connected. 04-20 22:26:54.910: D/IabHelper(3960): Checking for in-app billing 3 support. 04-20 22:26:54.915: D/IabHelper(3960): In-app billing version 3 supported for com.trivialdrivesample.free 04-20 22:26:54.925: D/IabHelper(3960): Subscriptions AVAILABLE. 04-20 22:26:54.925: D/TrivialDrive(3960): Setup finished. 04-20 22:26:54.925: D/TrivialDrive(3960): Setup successful. Querying inventory. 04-20 22:26:54.925: D/IabHelper(3960): Starting async operation: refresh inventory 04-20 22:26:54.935: D/IabHelper(3960): Querying owned items, item type: inapp 04-20 22:26:54.935: D/IabHelper(3960): Package name: com.trivialdrivesample.free 04-20 22:26:54.935: D/IabHelper(3960): Calling getPurchases with continuation token: null 04-20 22:26:54.955: D/CLIPBOARD(3960): Hide Clipboard dialog at Starting input: finished by someone else... ! 04-20 22:26:54.965: D/IabHelper(3960): Owned items response: 0 04-20 22:26:54.965: D/IabHelper(3960): Continuation token: null 04-20 22:26:54.965: D/IabHelper(3960): Querying SKU details. 04-20 22:26:54.965: D/IabHelper(3960): queryPrices: nothing to do because there are no SKUs. 04-20 22:26:54.965: D/IabHelper(3960): Querying owned items, item type: subs 04-20 22:26:54.965: D/IabHelper(3960): Package name: com.trivialdrivesample.free 04-20 22:26:54.965: D/IabHelper(3960): Calling getPurchases with continuation token: null 04-20 22:26:54.975: D/IabHelper(3960): Owned items response: 0 04-20 22:26:54.975: D/IabHelper(3960): Continuation token: null 04-20 22:26:54.975: D/IabHelper(3960): Querying SKU details. 04-20 22:26:54.975: D/IabHelper(3960): queryPrices: nothing to do because there are no SKUs. 04-20 22:26:54.975: D/IabHelper(3960): Ending async operation: refresh inventory 04-20 22:26:54.975: D/TrivialDrive(3960): Query inventory finished. 04-20 22:26:54.975: D/TrivialDrive(3960): Query inventory was successful. 04-20 22:26:54.975: D/TrivialDrive(3960): User is NOT PREMIUM 04-20 22:26:54.975: D/TrivialDrive(3960): User DOES NOT HAVE infinite gas subscription. 04-20 22:26:55.000: D/dalvikvm(3960): GC_EXTERNAL_ALLOC freed 29K, 49% free 2762K/5379K, external 467K/513K, paused 23ms 04-20 22:26:55.005: D/TrivialDrive(3960): Initial inventory query finished; enabling main UI. 04-20 22:27:03.490: D/TrivialDrive(3960): Buy gas button clicked. 04-20 22:27:03.495: D/TrivialDrive(3960): Launching purchase flow for gas. 04-20 22:27:03.495: D/IabHelper(3960): Starting async operation: launchPurchaseFlow 04-20 22:27:03.495: D/IabHelper(3960): Constructing buy intent for gas, item type: inapp 04-20 22:27:03.550: D/IabHelper(3960): Launching buy intent for gas. Request code: 10001 04-20 22:27:03.620: D/CLIPBOARD(3960): Hide Clipboard dialog at Starting input: finished by someone else... ! 04-20 22:27:16.580: D/TrivialDrive(3960): onActivityResult(10001,0,Intent { (has extras) } 04-20 22:27:16.580: D/IabHelper(3960): Ending async operation: launchPurchaseFlow 04-20 22:27:16.580: D/IabHelper(3960): Purchase canceled - Response: 5:Developer Error 04-20 22:27:16.580: D/TrivialDrive(3960): Purchase finished: IabResult: User canceled. (response: -1005:User cancelled), purchase: null 04-20 22:27:16.580: E/TrivialDrive(3960): * * TrivialDrive Error: Error purchasing: IabResult: User canceled. (response: -1005:User cancelled) 04-20 22:27:16.580: D/TrivialDrive(3960): Showing alert dialog: Error: Error purchasing: IabResult: User canceled. (response: -1005:User cancelled) 04-20 22:27:16.710: D/dalvikvm(3960): GC_EXTERNAL_ALLOC freed 61K, 48% free 2840K/5379K, external 917K/920K, paused 21ms 04-20 22:27:16.715: D/TrivialDrive(3960): onActivityResult handled by IABUtil.

Based on your comments above, the problem now seems clear:

When you download the app to your device from Eclipse, Eclipse automatically signs your APK with your debug key (which is typically automatically generated by Eclipse), whereas the APK that you uploaded would have to be signed with your own (non-debug) signing key (because otherwise Google Play would not accept it). So, the signature of the file with which you are testing (from Eclipse) and that of the uploaded APK, do not match. That is what is causing the error that indicates that your app is not configured for billing.

You do not have to receive the APK directly from Google Play for testing; you can just load the same signed APK as you uploaded to Google Play from your PC, via a USB cable. In fact, so long as your local APK has the same signature and the same VersionCode as the APK that you uploaded, you can send it to your device over USB using ADB and it should run. This is important because when you are testing you will want to make various minor fixes without having to re-upload and wait several hours each time before testing.

Thank you Carl for you points. I read over and over again and seemed to do everything right, except I was uploading the APK direct from Eclipse to the phone via a cable. The documentation is not clear enough. It should say that the app must only be downloaded from GP, and not from any development environment. The minute I did that, it worked. Thanks again. I'm off to working on my real app now for IAB. ;-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM