Skip to content
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

Crashes when starting a new activity using kotlin #153

Open
dayanithi06 opened this issue Jun 28, 2018 · 0 comments
Open

Crashes when starting a new activity using kotlin #153

dayanithi06 opened this issue Jun 28, 2018 · 0 comments

Comments

@dayanithi06
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant