Android - In App Purchase - you need to add the BILLING permission to your APK

笑着哭i 提交于 2021-01-20 14:39:48

问题


I have been facing a IN - App Purchase problem since long time. I need to integrate In-App functionality in my Android Application, but When I upload the APK file to the play store, it does not allow me to add SKU values. To add in-app products, you need to add the BILLING permission to your APK I have been added "com.android.vending.BILLING" permission in manifest file


1. I downloaded TRIVAL-DRIVER project.
2. Create a new library Project "BILLLING LIBRARY" with my Custom package name eg: Abc.xyz
3. Copy All UTLITY files ALONG .AIDL file[with default package name com.android.vending.billing]in my new Project
4. Gave Reference of that "BILLING LIBRARY" project to MY APPLICATION.
5. Create a signed APK fie and uploaded it to Play Store - [DRAFT]
6. When I go to create SKU values, it gives me the message "To add in-app products, you need to add the BILLING permission to your APK." and doesn't allow to add SKU values.

Any suggestion or tips would be appreciated.


回答1:


Have you added this line in your manifest file

<uses-permission android:name="com.android.vending.BILLING" />



回答2:


Since September, 2017 is not necessary anymore to add <uses-permission android:name="com.android.vending.BILLING" />

Play Billing Library 1.0 Release (2017-09-19, Announcement)

Important changes

Embedded billing permission inside library’s manifest. It's not necessary to add the com.android.vending.BILLING permission inside Android manifest anymore.

https://developer.android.com/google/play/billing/billing_library_releases_notes#release-1_0

Just ensure that you are using the latest version of 'com.android.billingclient:billing' in your app gradle configuration file.




回答3:


You need to add permission to your manifest :

<uses-permission android:name="com.android.vending.BILLING" />

Refer: http://developer.android.com/google/play/billing/billing_integrate.html




回答4:


Updating Your Application's Manifest

In-app billing relies on the Google Play application, which handles all communication between your application and the Google Play server. To use the Google Play application, your application must request the proper permission. You can do this by adding the com.android.vending.BILLING permission to your AndroidManifest.xml file. If your application does not declare the In-app Billing permission, but attempts to send billing requests, Google Play will refuse the requests and respond with an error.

To give your app the necessary permission, add this line in your Android.xml manifest file:

<uses-permission android:name="com.android.vending.BILLING" />

Ref Implementing In-app Billing

Also See Google I/O 2013 - In-App Billing Version 3




回答5:


For me, uploading a new APK with the com.android.vending.BILLING permission was not enough to make the error message go away.

I also had to release the APK to an internal test track.




回答6:


I FIXED IT BY changing billing to BILLING




回答7:


Same case with Xander for me, had to make a mock roll out on Internal Test track at least first for the latest apk to be recognized with the updated manifest(having the <uses-permission android:name="com.android.vending.BILLING"/> on profile/AndroidManifest.xml




回答8:


I also got this message. This message and problem disappeared when i roll-out release. After this all functions work fine



来源:https://stackoverflow.com/questions/17211507/android-in-app-purchase-you-need-to-add-the-billing-permission-to-your-apk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!