Skip to content Skip to sidebar Skip to footer

Java.lang.nullpointerexception: In Androidstudio

I have an Android app. This app has 12 activities, the first activity is the Splash Screen and sec activity is the intropage and 3rd activity is main and etc When I run the app,

Solution 1:

Please follow the below options. Hope your problem will be solved.

1) Your Manifest Must Change like this Activity name must Specified like ".YourActivityname"

<activityandroid:name=".MainActivity"  ></activity>

2) Clean and rebuilt the project and Hope it will work.

Solution 2:

You forgot find view btn_last_story add it to onCreate

btn_last_story = findViewById(R.id.btn_last_story);

Post a Comment for "Java.lang.nullpointerexception: In Androidstudio"