Search code examples
javaandroideclipseandroid-activityandroid-developer-api

Android API 22 loading error


I created an Android Project in Eclipse Luna targeting API 22 and the minimum sdk was set to API 8, when I tried to open the activity_main xml file, the rendering worked fine for all other versions(shown below in first screenshot) but 22(second screenshot) For API 21 enter image description here

And the error logs are in the second screenshot. I am just trying out Android development and I am really confused. Does anyone know if this is a problem I caused or is it a bug? Thanks a bunch.

The error log:

Failed to find the style corresponding to the id 2130772026

Failed to find the style corresponding to the id 2130771996

java.lang.NullPointerException

Exception details are logged in Window > Show View > Error Log

The following classes could not be instantiated:

-android.support.v7.internal.app.WindowDecorActionBar (Open Class, Show Error Log)

See the Error Log (Window > Show View) for more details.


Solution

  • Another solution is there. Go to style.xml and write this item in appcompat.light parent style.

    <style name="AppCompatTheme" parent="@style/Theme.AppCompat.Light">
        <item name="windowActionBar">false</item> 
    </style>