github上有一个项目:https://github.com/adonixis/android-lightbox 我下载了该项目并将其启动到Android Studio中,但没有用。 我不是Java程序员,所以我无法理解Android Studio给出的错误与以下内容有关:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.adonixis.lightbox, PID: 21749
java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.adonixis.lightbox/ru.adonixis.lightbox.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStreamWriter.write(java.lang.String)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStreamWriter.write(java.lang.String)' on a null object reference
at ru.adonixis.lightbox.MainActivity.onCreate(MainActivity.java:230)
at android.app.Activity.performCreate(Activity.java:6679)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
此错误与什么有关,如何消除?