하루에 몇 가지 오류가 발생했으며 어떤 일이 일어나고 있는지 잘 모르겠습니다.Android : 내 애플리케이션을 왜 상하게합니까?
자세한 정보가 필요하면 알려 주시기 바랍니다.
나는 무엇이든을위한 충분한 정보를주지 않았을 것입니다. 여기
내가 내 개발자 콘솔에서 얻을 오류입니다 :java.lang.RuntimeException: Unable to destroy activity {com.Calculator.SalesTaxCalculator/com.Calculator.SalesTaxCalculator.Calculator}: java.lang.NullPointerException
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3199)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3264)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3380)
at android.app.ActivityThread.access$1600(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1049)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4369)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:846)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.content.ComponentName.<init>(ComponentName.java:75)
at android.content.Intent.<init>(Intent.java:2920)
at com.Calculator.SalesTaxCalculator.BillingHelper.stopService(BillingHelper.java:265)
at com.Calculator.SalesTaxCalculator.Calculator.onDestroy(Calculator.java:302)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3181)
... 12 more
라인 (302)
라인 (301)과 저쪽 (이 해당 페이지에 코드의 마지막 세트입니다에서protected void onDestroy() {
.)
@Override
protected void onDestroy() {
BillingHelper.stopService();
super.onDestroy();
}
}
StopService 방법 충돌 보고서 중 하나에 넣어 사람
public static void stopService(){
mContext.stopService(new Intent(mContext, BillingService.class));
mService = null;
mContext = null;
mCompletedHandler = null;
Log.i(TAG, "Stopping Service");
}
}
BillingHelper의 앱이조차 열리지 않습니다 것을 코멘트. 더 많은 정보는 공유 환경 설정을 사용하여 계산기에 숫자를 저장한다는 것입니다. 또한 인앱 결제 서비스를 사용하는 기부 버튼이 있습니다.
Calculator.java:302 또한이 행을 게시하십시오. –
붙여 넣기해야 할 최소한의 것들은 모든 액티비티의 detroy 코드입니다. 그리고 계산기 코드. 거기에 오류가있는 것으로 보입니다. – sebap123
'BillingHelper.stopService()'에도 오류가있을 수 있습니다. – Vladimir