13

everyone.
I just started with in app purchase in my application.
It's something new for me.
Now I've seen some examples on the net, I found that one project on github was full of errors before I linked the billing library to it.
When I did I just solved the errors in the project, but still got an exclamation red mark on it because the android billing library package has errors.
I checked the error, but I couldn't solve it, because I didn't understand how to.
Please guys, I really need some help.

I got the error in these lines

    @Override 
    public android.os.IBinder asBinder()
    {
        return this;
    }

in asBinder the error and its saying "Multiple markers at this line

- The method asBinder() of type IMarketBillingService.Stub must override a superclass method  
- implements android.os.IInterface.asBinder"

Same to this code also i getting an error

    @Override
    public android.os.Bundle sendBillingRequest(android.os.Bundle bundle) throws android.os.RemoteException     
    {
        android.os.Parcel _data = android.os.Parcel.obtain();
        android.os.Parcel _reply = android.os.Parcel.obtain();
        android.os.Bundle _result;
        try {
            _data.writeInterfaceToken(DESCRIPTOR);
            if ((bundle!=null)) {
                _data.writeInt(1);
                bundle.writeToParcel(_data, 0);
            } else {
                _data.writeInt(0);
            }
            mRemote.transact(Stub.TRANSACTION_sendBillingRequest, _data, _reply, 0);
            _reply.readException();
            if ((0!=_reply.readInt())) 
            {
                _result = android.os.Bundle.CREATOR.createFromParcel(_reply);
            } else {
                _result = null;
            }
        }
        finally {
            _reply.recycle();
            _data.recycle();
        }
        return _result;
    }
}

static final int TRANSACTION_sendBillingRequest = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
}

I don't know what these errors are.
I just got this library as it is and placed it in my Eclipse project.
And the error is in InAppBillingService, which I can't access because it's auto generated!!

Thanks in advance.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Mostafa Addam
  • 6,956
  • 4
  • 20
  • 38
  • I managed to solve my issue through these step i found by mistake in this site stackoverflow here is the link http://stackoverflow.com/questions/13418476/errors-in-generated-imarketbillingservice-java-file – Mostafa Addam Feb 08 '13 at 19:29
  • are u importing IMarketBillingService class or not – Meghna May 18 '14 at 12:57
  • Follow the step to resolve the problem: http://stackoverflow.com/questions/13418476/how-to-rectify-the-errors-in-the-autogenerated-imarketbillingservice-java-file – Usman Afzal May 25 '14 at 05:48
  • 2
    You should reply and mark your own answer as accepted, or delete your question. – Daniele Ricci Jul 07 '14 at 12:34

1 Answers1

0

It was getting a lot of errors in the generated IInAppBillingService.java. I tried many, many suggested solutions without success. Finally a variant of Zedifire's method worked on my Eclipse SDK. (these steps are from memory - try around until it works!)

turned off >Project>Build Automatically deleted the /gen files THEN went to >Window>Preferences>Java>Compiler and found that somehow compliance level had defaulted to 1.5 changed compliance back to level 1.7

Project>Clean Project>Build All (still errors!) Right clicked on project window >android tools>fix project properties

jned29
  • 477
  • 12
  • 50