98

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.

9 Answers 9

206

Have you added this line in your manifest file

<uses-permission android:name="com.android.vending.BILLING" />
9
  • 5
    This doesn't show in autocomplete, is this still valid? Dec 17, 2017 at 23:17
  • 10
    By 2017 Google removed this permission need. Please check my answer below, and please mark that as right answer. People are getting messed answers. Apr 18, 2019 at 2:10
  • 8
    As of 12/2019 you have to place that into your manifest file. Dec 19, 2019 at 16:07
  • 9
    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, 2020 at 6:11
  • 4
    @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. Dec 30, 2020 at 17:44
77

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
  • 19
    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. Oct 31, 2019 at 18:59
  • You can find the version number of the latest release of the library here: developer.android.com/google/play/billing/release-notes Apr 21, 2021 at 6:18
  • Sandro is right. if you still include this permission in your app, google play will issue a warning of "Anomalous Permission Usage" in the "security & trust" section of the pre-launch report.
    – mx1up
    Oct 8, 2022 at 18:40
15

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

2
  • i had permision <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="com.android.vending.BILLING" /> but yet not able to add product Oct 22, 2013 at 10:24
  • 3
    By 2017 Google removed this permission need Apr 18, 2019 at 2:09
13

2023 year correct answer:

Just add to app build.gradle:

def billing_version = "5.1.0" // for today, it's the latest
implementation "com.android.billingclient:billing:$billing_version"

Then, create Closed testing release in Google Play console, upload the apk/bundle into it and start rollout. Right after this, you will be able to add subscriptions/in-app products.

1
8

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

4
  • 2
    If we dont ADD PREMISSION to manifest file, than Play Store refused to Upload the APK file, it gives ERROR. but my APK file has been uploaded. it just not allowing me to create SKU values Jun 20, 2013 at 10:46
  • you can upload the .apk file again than create SKU and see it allow you or not Jun 20, 2013 at 10:49
  • Nopes, Still Same Message! Jun 20, 2013 at 11:19
  • By 2017 Google removed this permission need. Apr 18, 2019 at 2:09
5

I FIXED IT BY changing billing to BILLING

1
  • Although the right typing is BILLING, it is not even necessary to include this permission. Apr 18, 2019 at 2:08
4

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

3

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.

1
  • Same here. Fortunately, the in-app setup was available as soon as I submitted the closed test app. I didn't have to wait for the release to be approved by Google.
    – arlomedia
    Feb 1, 2023 at 23:49
3

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 recognised with the updated manifest(having the the following permission on profile/AndroidManifest.xml

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.