我正在尝试实现 inapp 计费功能,我的主要活动中有以下内容:
public class screen_Home extends base_Activity{
...
private AppPurchaseObserver appPurchaseObserver;
private Handler handler;
...
private abstract class AppPurchaseObserver extends PurchaseObserver {
public AppPurchaseObserver(Handler handler) {
super(BT_screen_home.this, handler);
}
}
...
在 onCreate 中:
...
handler = new Handler();
appPurchaseObserver = new AppPurchaseObserver(handler);
....
在最后一行,AppPurchaseObserver 在 Eclipse 中用红色下划线给出错误:无法实例化类型 screen_Home.AppPurchaseObserver
我做错了什么?
谢谢你的帮助