【发布时间】:2023-03-27 14:59:01
【问题描述】:
每个人。
我刚开始在我的应用程序中进行应用内购买。
这对我来说是新事物。
现在在网上看了一些例子,发现github上的一个项目,在链接计费库之前,已经报错了。
当我这样做时,我刚刚解决了项目中的错误,但由于android计费库包有错误,它仍然有一个感叹号红色标记。
我检查了错误,但我无法解决它,因为我不明白如何。
拜托各位,我真的需要一些帮助。
我在这些行中得到了错误
@Override
public android.os.IBinder asBinder()
{
return this;
}
在 asBinder 中出现错误并显示“此行有多个标记
- The method asBinder() of type IMarketBillingService.Stub must override a superclass method
- implements android.os.IInterface.asBinder"
与此代码相同,我也收到错误
@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);
}
我不知道这些错误是什么。
我刚刚得到了这个库,并将它放在我的 Eclipse 项目中。
错误出现在 InAppBillingService 中,我无法访问它,因为它是自动生成的!!
提前致谢。
【问题讨论】:
-
我设法通过这些步骤解决了我的问题,我在这个站点 stackoverflow 中错误地发现了这里是链接stackoverflow.com/questions/13418476/…
-
你是否在导入 IMarketBillingService 类
-
您应该回复并将您自己的答案标记为已接受,或者删除您的问题。
标签: android android-library android-billing