The method findViewById(int) is undefined for the type activity.
Solution for this error is very simple you have to remove unusable import from your android MainActivity.java programming file and import another activity file. So here is the complete step by step tutorial for Solve The hierarchy of the type is inconsistent android error.
Solve The hierarchy of the type is inconsistent android error.
1. Remove ” import android.support.v7.app.ActionBarActivity; ” import from your file.
2. Put ” import android.app.Activity; ” .
3. Goto your public class function.
4. Remove ” ActionBarActivity ” and place ” Activity “.
Now save your project and enjoy.