nucleus icon indicating copy to clipboard operation
nucleus copied to clipboard

Crashes when starting a new activity using kotlin

Open dayanithi06 opened this issue 6 years ago • 0 comments

I tried with extending AppCompactActivity it works. But with nucleusappcompactactivity crashes.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dayanithi.supercamping/com.dayanithi.supercamping.activities.admin.AdminLoginClass}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2821) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:181) at android.app.ActivityThread.main(ActivityThread.java:6295) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference at android.content.ContextWrapper.getResources(ContextWrapper.java:86) at android.view.ContextThemeWrapper.getResourcesInternal(ContextThemeWrapper.java:127) at android.view.ContextThemeWrapper.getResources(ContextThemeWrapper.java:121) at android.support.v7.app.AppCompatActivity.getResources(AppCompatActivity.java:542) at android.view.Window.getDefaultFeatures(Window.java:1627) at android.view.Window.(Window.java:668) at com.android.internal.policy.PhoneWindow.(PhoneWindow.java:333) at com.android.internal.policy.PhoneWindow.(PhoneWindow.java:341) at android.app.Activity.attach(Activity.java:6797)

dayanithi06 avatar Jun 28 '18 09:06 dayanithi06