5

I keep getting this error when I try to make an in-app purchase. I have uploaded a previous version of this app where I was able to make in-app purchases successfully! I have looked at the manifest file and it is identical (except for the version code) - but I cannot shake off this error :(

Is there a document that describes how to handle this? I have tried all the remedies suggested in this forum, including: - making sure that I build an unsigned apk and explicitly sign it with my release key (yes - I have checked to make sure that the key/password is accurate) - making sure that the right permissions are enabled (havent changed this since the last successful build

I am missing something trivial - but for the life of me, I cannot figure what!

Please help!

Here is my manifest file below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.foo.bar"
    android:versionName="1.4" android:versionCode="18">

    <uses-sdk android:minSdkVersion="9" 
          android:targetSdkVersion="9" />

    <uses-permission android:name="android.permission.WAKE_LOCK" >
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.INTERNET" >
    </uses-permission>
    <uses-permission android:name="com.android.vending.BILLING" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <application
        android:debuggable="false"
        android:icon="@drawable/video"
        android:label="@string/app_name" >
        <activity android:name="com.inappbilling.InappActivity" />
        <activity
            android:configChanges="orientation"
            android:label="@string/app_name"
            android:name=".SplashActivity"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Favorites"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".PlayVideo"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".Featured"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".FacebookLike"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>

        <service android:name="com.inappbilling.BillingService" />

        <receiver android:name="com.inappbilling.BillingReceiver" >
            <intent-filter >
                <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
                <action android:name="com.android.vending.billing.RESPONSE_CODE" />
                <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
            </intent-filter>
        </receiver>
    </application>

</manifest>
Srini
  • 184
  • 1
  • 3
  • 8

7 Answers7

10

You say that you already exported a signed application ("release" version), so the only other possibility I can think of is that the release version on your device is higher than the one "published".

Community
  • 1
  • 1
Bill The Ape
  • 3,261
  • 25
  • 44
8

I had this error and tried various suggestions from other posts on this topic but none worked.

In the end I found that it was caused by my debugger using a different key to the APK I uploaded to Google Play.

I was using the default debug.keystore which expires within a year.

I had to create a new debug.keystore which expires in more than fifty years (this limit came form an error message in Google Play when I tried to upload it).

I then built the application and uploaded the APK from my application's bin folder (built with my new debug.keystore).

On Windows 7 you can generate the new debug.keystore with this command (delete the existing debug.keystore first):

C:\Users\MyUserName\.android>"C:\Program Files\Java\jdk1.6.0\bin"\keytool.exe -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 21900

Your path to keytool.exe might differ from mine depending upon what is installed.

khr055
  • 28,690
  • 16
  • 36
  • 48
iggit
  • 81
  • 1
  • 2
3

PLease export the app as signed application and then install it on the phone, you will never see this error in further.

You can refer the link also:

Application Error : This version of the application is not configured for Market Billing

Community
  • 1
  • 1
jyotiprakash
  • 2,086
  • 1
  • 20
  • 26
  • 2
    I have tried that as well - with similar results :(...What are conditions that trigger this error? – Srini Feb 24 '12 at 04:53
1

I had the same problem and had to install the app from the market itself before it worked. Sideloading the same APK didn't work for some reason.

easycheese
  • 5,859
  • 10
  • 53
  • 87
  • Sideloading the same APK actually works for me. See [this link](http://stackoverflow.com/questions/8099399/android-how-to-update-an-android-app-with-inapp-billing/8944080#8944080) for clarifications. – Bill The Ape Mar 05 '12 at 17:48
0

Instead of running application directly from your IDe ( Eclipse )

Install Latest Apk file Which is uploaded to Android market

I face same problem later it was because I was running a debug, unsigned version of my app. In Eclipse, when I exported and signed my application and installed it on the phone, then I was able to use my in-app products without seeing this error messag

sravan
  • 5,303
  • 1
  • 31
  • 33
0

this issue occur wen you upload signed app to the market(which is necessary) and then test it on the device the Debug .apk file. so avoid this thing add the signed .apk to your device and then run the .apk you will see there is no issue with this .apk and in-app products

Usman Kurd
  • 7,212
  • 7
  • 57
  • 86
0

Here is what I have observed while using In-App-Billing.

  • When you upload your release apk (regardless of Alpha/Beta/Production), IAB will not work right away, you will have to wait for a few hours before it can work

  • Uploading a new version of the apk (higher version) will also be the same. You will have to wait for a few hours for it to eventually work. The older version with IAB will still work though. What I usually do is to upload my release apk as Beta, wait a few hours, then when it is already working, promote the apk to production.

Mark Pazon
  • 6,167
  • 2
  • 34
  • 50