Unable to start activity ComponentInfo {com. first/com. first. Game}, unabletostartgame
Cause 1: xxx error. If it is R. layout. main should be main. tag usage errors in xml files. The most common errors that are not prompted by the compiler are the confusion between android: name and android: id. Check the main. all labels in xml are correct. Cause 2: The requestWindowFeature () method is used after the setContentView (view) method. If this error is returned, the requestFeature must be used before setContentView, you only need to put the requestWindowFeature () method before the setContentView (view) method. cause 3: In addition to the onCreate () method, the findById (R. id. xx), You Need To findById (R. id. xx) to solve the problem. 4. The view is not instantiated before setContentView (view). It is only declared and directly setContentView (view). Check whether the view is setContentView (view) cause 5 can be solved by instantiation in the method before calling: because of a null pointer error, you should check whether there is a value in something like a Spinner or list.