nalaiqChughtai
nalaiqChughtai

Reputation: 1297

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

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.

Upvotes: 102

Views: 106866

Answers (9)

oxied
oxied

Reputation: 1908

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.

Upvotes: 15

rodalyn camba
rodalyn camba

Reputation: 139

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"/>

Upvotes: 2

dimvolk
dimvolk

Reputation: 400

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

Upvotes: 4

Xander
Xander

Reputation: 1696

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.

Upvotes: 3

Sandro Wiggers
Sandro Wiggers

Reputation: 4693

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.

Upvotes: 83

nalaiqChughtai
nalaiqChughtai

Reputation: 1297

I FIXED IT BY changing billing to BILLING

Upvotes: 4

Kirit  Vaghela
Kirit Vaghela

Reputation: 12664

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

Upvotes: 6

marshallino16
marshallino16

Reputation: 2671

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

Upvotes: 13

Nirali
Nirali

Reputation: 13805

Have you added this line in your manifest file

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

Upvotes: 207

Related Questions