如何纠正自动生成的IMarketBillingService.java文件中的错误?

Mic*_*hal 28 android in-app-billing

我正在尝试In app billing在我的Andorid应用程序中实现服务.

我已将IMarketBillingService.aidl文件添加到Eclipse中的项目中.然后Eclipse自动生成了该IMarketBillingService.java文件,但有很多错误.

@Override public android.os.IBinder asBinder() { return mRemote; }
- implements android.os.IInterface.asBinder
- The method asBinder() of type IMarketBillingService.Stub.Proxy must override asuperclass  method

@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;
......
}
- The method sendBillingRequest(Bundle) of type IMarketBillingService.Stub.Proxy must override a superclass method
- implements com.android.vending.billing.IMarketBillingService.sendBillingRequest 
Run Code Online (Sandbox Code Playgroud)

谁能帮我这个?

我正在使用Mac,Eclipse Juno和最新版本的Android SDK.

小智 78

您可以尝试使用默认编译选项.

  1. 右键单击(或按住Control键单击)项目,然后选择"属性"
  2. 选择"Java编译器"
  3. 取消选中"启用项目特定设置"

Eclipse将提示重新编译,它应该都很好.

  • 我的版本从1.5改为1.6,这很有效. (5认同)
  • 你是一个邪恶的人.得到了1000个错误!! (2认同)