Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference
问题 Basically this app is supposed to ask for your name, with an option to save, which when click, an alert dialog pops up and asks 'are you sure?', when yes is clicked, it should say 'welcome + whatever name put'. my problem is that the app keeps shutting down before it says welcome. I declared the string as userName and ran it without any function to the string, and it just said 'welcome, null'. but when i did userName=editText.getText().toString(); the app shut down immediately. Please HELP I