Solve The hierarchy of the type is inconsistent android error

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.

import android-support-v7-app-ActionBarActivity

2. Put ” import android.app.Activity; ” .

3. Goto your public class function.

Solve The hierarchy of the type is inconsistent android error

4. Remove ” ActionBarActivity ” and place ” Activity “.

activity

Now save your project and enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *