New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this Issue Sep 27, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@TomGarden-2

TomGarden-2 commented Sep 27, 2018

/*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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment