TomGarden / Tetris

Sky overcast
1 stars 1 forks source link

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.farbox.androidbyeleven/com.farbox.androidbyeleven.View.Activity.MenuActivityNew}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.content.Context. #12

Open TomGarden-2 opened 6 years ago

TomGarden-2 commented 6 years ago
/*Device Info*/
[硬]设备制造商=Genymotion
[硬]设备型号=Custom
[硬]CPU型号=null
[硬]RAM=2.10 GB
[硬]ROM=13.38 GB
[OS][三方定制系统版本]=Android/vbox86p/vbox86p:8.0.0/OPR6.170623.017/32:userdebug/test-keys
[OS]产品名称(adb shell)=vbox86p
[OS][系统名称]=Android
[OS][Android版本]=8.0.0(26)
[app]versionName=1.0
[app]versionCode=1
/*Exception*/
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.farbox.androidbyeleven/com.farbox.androidbyeleven.View.Activity.MenuActivityNew}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.content.Context.getExternalCacheDir()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.content.Context.getExternalCacheDir()' on a null object reference
    at io.github.TomGarden.tom_log.LocalizeLog.initCurrentLogName(LocalizeLog.java:122)
    at io.github.TomGarden.tom_log.LocalizeLog.getLogFilePath(LocalizeLog.java:208)
    at io.github.TomGarden.tom_log.LocalizeLog.write2File(LocalizeLog.java:45)
    at io.github.TomGarden.tom_log.LocalizeLog.writeRoutineLog(LocalizeLog.java:60)
    at io.github.TomGarden.tom_log.LogUtil.e(LogUtil.java:166)
    at io.github.tomgarden.tom_theme.Overflow.tomSetTheme(Overflow.java:18)
    at com.farbox.androidbyeleven.View.Activity.MenuActivityNew.customTheme(MenuActivityNew.java:62)
    at com.farbox.androidbyeleven.View.Activity.BaseActivity.onCreate(BaseActivity.java:20)
    at android.app.Activity.performCreate(Activity.java:6975)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
    ... 9 more
java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.content.Context.getExternalCacheDir()' on a null object reference
    at io.github.TomGarden.tom_log.LocalizeLog.initCurrentLogName(LocalizeLog.java:122)
    at io.github.TomGarden.tom_log.LocalizeLog.getLogFilePath(LocalizeLog.java:208)
    at io.github.TomGarden.tom_log.LocalizeLog.write2File(LocalizeLog.java:45)
    at io.github.TomGarden.tom_log.LocalizeLog.writeRoutineLog(LocalizeLog.java:60)
    at io.github.TomGarden.tom_log.LogUtil.e(LogUtil.java:166)
    at io.github.tomgarden.tom_theme.Overflow.tomSetTheme(Overflow.java:18)
    at com.farbox.androidbyeleven.View.Activity.MenuActivityNew.customTheme(MenuActivityNew.java:62)
    at com.farbox.androidbyeleven.View.Activity.BaseActivity.onCreate(BaseActivity.java:20)
    at android.app.Activity.performCreate(Activity.java:6975)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
TomGarden-2 commented 5 years ago
/*Device Info*/
[硬]设备制造商=Genymotion
[硬]设备型号=Custom
[硬]CPU型号=null
[硬]RAM=1.04 GB
[硬]ROM=13.38 GB
[OS][三方定制系统版本]=Android/vbox86p/vbox86p:8.0.0/OPR6.170623.017/32:userdebug/test-keys
[OS]产品名称(adb shell)=vbox86p
[OS][系统名称]=Android
[OS][Android版本]=8.0.0(26)
[app]versionName=1.0
[app]versionCode=1
/*Exception*/
java.lang.RuntimeException: (TomGestureDetector.java:241)>>>case = 12
    at io.github.TomGarden.tom_log.LogUtil.ASSERT(LogUtil.java:244)
    at io.github.TomGarden.tetris.Control.TomGestureDetector.onSingleTapUpLevel_1_3(TomGestureDetector.java:241)
    at io.github.TomGarden.tetris.Control.TomGestureDetector.onSingleTapUp(TomGestureDetector.java:203)
    at android.view.GestureDetector.onTouchEvent(GestureDetector.java:640)
    at io.github.TomGarden.tetris.Control.TomGestureDetector$GestureDetector.onTouchEvent(TomGestureDetector.java:84)
    at io.github.TomGarden.tetris.Control.TomGestureDetector.onTouchEvent(TomGestureDetector.java:178)
    at io.github.TomGarden.tetris.CustomWeights.TomConstraintLayout.onTouchEvent(TomConstraintLayout.java:46)
    at android.view.View.dispatchTouchEvent(View.java:11721)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2955)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2636)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
    at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:445)
    at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1828)
    at android.app.Activity.dispatchTouchEvent(Activity.java:3292)
    at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
    at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
    at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:407)
    at android.view.View.dispatchPointerEvent(View.java:11960)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4776)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4590)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4181)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4147)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4274)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4155)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4331)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4181)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4147)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4155)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6642)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6616)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6577)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6745)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:325)
    at android.os.Looper.loop(Looper.java:142)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)