Android App (run by Android Studio) don’t force close when get Exception

I don’t know why my app (run by Android Studio) don’t force close when my app get NullPointer Exception and don’t show Exception in logcat. It becomes a black screen in a long time and then show the message “Nameapp isn’t responding. Do you want to close it?”

If i run app by eclipse, my app will stop and close app immediately and show Exception to logcat.

How to fix it? Please help, thank you so much.

Here is my NullpointerException test:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    View view = null;
    view.setVisibility(View.Gone);
}


Source: android

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.