我正在使用 Dungeons 应用程序示例,并且正在使用该示例中提供的 BillingService 类。
我正在使用 Java 6,@override 对我有用,但在 BillingService.java 中的这两个方法出现编译错误:
/**
* This is called when we are connected to the MarketBillingService.
* This runs in the main UI thread.
*/
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
if (Consts.DEBUG) {
Log.d(TAG, "Billing service connected");
}
mService = IMarketBillingService.Stub.asInterface(service);
runPendingRequests();
}
/**
* This is called when we are disconnected from the MarketBillingService.
*/
@Override
public void onServiceDisconnected(ComponentName name) {
Log.w(TAG, "Billing service disconnected");
mService = null;
}
有人能帮我理解为什么会这样吗?
谢谢!