63

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.

Bruno Bieri
  • 7,754
  • 10
  • 55
  • 79
nalaiqChughtai
  • 879
  • 2
  • 8
  • 15

8 Answers8

146

Have you added this line in your manifest file

<uses-permission android:name="com.android.vending.BILLING" />
Nirali
  • 12,335
  • 6
  • 35
  • 52
  • @Nirali i had put it yet it's tell me to add in-app products, you need to add the BILLING permission to your APK. – PankajAndroid Oct 22 '13 at 10:22
  • 3
    This doesn't show in autocomplete, is this still valid? – quantumpotato Dec 17 '17 at 23:17
  • 1
    MY mistake was writing "android.vending.BILLING" instead of "com.android.vending.BILLING". – AbePralle Jan 25 '18 at 01:40
  • 5
    By 2017 Google removed this permission need. Please check my answer below, and please mark that as right answer. People are getting messed answers. – Sandro Wiggers Apr 18 '19 at 02:10
  • 1
    well I was asked for the permission by the store just now when I wanted to add for purchasing,... "please upload an APK with BILLING permission first" – chksr May 19 '19 at 17:15
  • 6
    As of 12/2019 you have to place that into your manifest file. – Chris Parker Dec 19 '19 at 16:07
  • 3
    one thing i dont understand in the docs is that i cant create an in-app product. it forces me to have to upload an apk with billing permission in the manifest. why would it do that? i want to test my app first before publishing it to play store. – chitgoks May 16 '20 at 06:11
  • 1
    @chitgoks just add a new apk to internal testing. Then you can just replace it for another when it is ready. I just did it and it worked for me. – Ferran Negre Dec 30 '20 at 17:44
  • Added this line in /android/app/src/main/AndroidManifest.xml worked for me. First, I added this line in /android/app/src/profile/AndroidManifest.xml and didn't worked. – George Alex Feb 15 '21 at 20:28
41

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.

Sandro Wiggers
  • 3,578
  • 2
  • 14
  • 22
  • 10
    This is true and useful, but your app still does need that permission. It's just that the library now does it for you, you don't hand-modify your AndroidManifest.xml. If you look at the the final merged AndroidManifest.xml file after building, you'll see that it's there after adding the library. – James Moore Oct 31 '19 at 18:59
  • You can find the version number of the latest release of the library here: https://developer.android.com/google/play/billing/release-notes – diachedelic Apr 21 '21 at 06:18
11

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

marshallino16
  • 2,586
  • 12
  • 29
7

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

Kirit Vaghela
  • 12,245
  • 4
  • 72
  • 79
3

I FIXED IT BY changing billing to BILLING

nalaiqChughtai
  • 879
  • 2
  • 8
  • 15
2

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.

Xander
  • 1,383
  • 10
  • 27
0

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

rodalyn camba
  • 51
  • 1
  • 1
0

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

dimvolk
  • 78
  • 1
  • 8