我已经实现了google play successfuly....and它的工作fine.....but,当我在关闭using...and之后关闭应用程序时,在关闭application...error几分钟后,给出了“应用程序停止了UNEXPEXTEDLY".....in日志猫,这表明错误在BillingService.java中。
10-10 13:38:38.739: E/AndroidRuntime(3586):由: java.lang.NullPointerException引起的
10-10 13:38:38.739: E/AndroidRuntime(3586):at .BillingService.handleCommand(BillingService.java:372)
10-10 13:38:38.739: E/AndroidRuntime(3586):at .BillingService.onStart(BillingService.java:362)
10-10 13:38:38.739: E/AndroidRuntime(3586):at android.app.Service.onStartCommand(Service.java:438)
我的密码是..。
public void onStart(Intent intent, int startId) {
handleCommand(intent, startId);------>362
}
public void handleCommand(Intent intent, int startId) {
String action = intent.getAction();------>line 732
if (Consts.DEBUG) {
Log.i(TAG, "handleCommand() action: " + action);
}
}
发布于 2012-10-10 09:07:37
我认为你必须完全退出应用程序。退出应用程序后,请检查任务管理器,如果任务管理器仍在运行的应用程序部分中,则必须结束该进程。
您可以检查以下代码:
// This you have to insert inside the exit button click event
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
onQuitPressed();
//This is the onQuitPressed method
//to remove application from task manager
public void onQuitPressed() {
int pid = android.os.Process.myPid();
android.os.Process.killProcess(pid);
}
https://stackoverflow.com/questions/12815592
复制相似问题