Unable to launch activity?

后端 未结 2 379
野趣味
野趣味 2021-01-26 10:53

I have made some changes in my code before adding async task my app working proper its authenticate username and password from remote server but unable to launch other activity

相关标签:
2条回答
  • 2021-01-26 11:06

    Converting comments to answer

    By looking at the logcat we can see that the problem is at line 41 of QuestionActivity. So we know that currentGame is null.

    You need to set breakpoints before that and see what is causing that to be null. You may have found that other variables/objects arenull which ends up causing the NPE.

    0 讨论(0)
  • 2021-01-26 11:15

    Context is wrong, just change:

    startActivity(new Intent(this, QuestionnActivity.class));
    

    to:

    startActivity(new Intent(LoActivity.this, QuestionnActivity.class));
    
    0 讨论(0)
提交回复
热议问题