FinestWebView-Android icon indicating copy to clipboard operation
FinestWebView-Android copied to clipboard

Exception java.lang.NullPointerException: Call Base.initialize(context) within your Application onCreate() method.

Open dtunctuncer opened this issue 7 years ago • 6 comments

java.lang.NullPointerException: Call Base.initialize(context) within your Application onCreate() method. at com.thefinestartist.Base.a(Base.java:30) at com.thefinestartist.utils.service.ServiceUtil.a(ServiceUtil.java:76) at com.thefinestartist.utils.service.ServiceUtil.M(ServiceUtil.java:251) at com.thefinestartist.utils.service.WindowManagerUtil.a(WindowManagerUtil.java:19) at com.thefinestartist.utils.ui.DisplayUtil.a(DisplayUtil.java:26) at com.thefinestartist.finestwebview.FinestWebViewActivity.e(FinestWebViewActivity.java:833) at com.thefinestartist.finestwebview.FinestWebViewActivity.c(FinestWebViewActivity.java:467) at com.thefinestartist.finestwebview.FinestWebViewActivity.onCreate(FinestWebViewActivity.java:889) at android.app.Activity.performCreate(Activity.java:5275) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2255) at android.app.ActivityThread.access$800(ActivityThread.java:142) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5118) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605) at dalvik.system.NativeStart.main(Native Method)

dtunctuncer avatar Jul 22 '16 21:07 dtunctuncer

My users are also experiencing the same issue. I'm using FWV v1.2.7 .

Crash Log,

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.talkoot.android/com.thefinestartist.finestwebview.FinestWebViewActivity}: java.lang.NullPointerException: Call Base.initialize(context) within your Application onCreate() method. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2677) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1515) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:227) at android.app.ActivityThread.main(ActivityThread.java:6100) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:859) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749) Caused by java.lang.NullPointerException: Call Base.initialize(context) within your Application onCreate() method. at com.thefinestartist.Base.getContext(Base.java:30) at com.thefinestartist.utils.service.WindowManagerUtil.com.thefinestartist.utils.service.ServiceUtil.getSystemService(WindowManagerUtil.java:2076) at com.thefinestartist.utils.ui.DisplayUtil.getWidth(DisplayUtil.java:26) at com.thefinestartist.finestwebview.FinestWebViewActivity.getMaxWidth(FinestWebViewActivity.java:1833) at com.thefinestartist.finestwebview.FinestWebViewActivity.onCreate(FinestWebViewActivity.java:889) at android.app.Activity.performCreate(Activity.java:6280) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1131) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2564) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2677) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1515) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:227) at android.app.ActivityThread.main(ActivityThread.java:6100) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:859) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)

Please fix this.

imidhuntv avatar Jul 27 '16 13:07 imidhuntv

@dtunctuncer Add Base.initialize(this) in onCreate() method of your App.java class which is extended from Application class. It fill fix this issue.

imidhuntv avatar Jul 27 '16 14:07 imidhuntv

@imidhuntv thank you, i guess they don't bother write replies to issues

dtunctuncer avatar Jul 27 '16 14:07 dtunctuncer

thank very much

ytgdoc avatar Sep 16 '17 10:09 ytgdoc

Base.java class which class it is imported from ?

mancyzbooni avatar Apr 02 '18 06:04 mancyzbooni

@mancyzbooni https://github.com/TheFinestArtist/AndroidBaseUtils

gistdoit avatar Mar 18 '20 09:03 gistdoit