Skip to content Skip to sidebar Skip to footer

Error Inflating Class Android.support.v7.widget.toolbar In Android Lollipop

I use the android.support library for my project, I have developed my app using android 4.4 and everything works good but my problem comes when I try to run the application in a de

Solution 1:

The cause of the error is that, in the toolbar xml, the ?attr prefix refers to attributes in support library themes. On the other hand, under v22 of style.xml above, the system theme android:Theme.Material.Light.NoActionBar instead of a support library theme is used. The inflater therefore cannot resolve attributes of the support library such as ?attr/actionBarSize.

Using the support library theme Theme.AppCompat.Light.NoActionBar in style.xml (regardless of version) addresses the issue.

Solution 2:

in my case the same error but no symptoms of ?attr in android axml file

it looks like a compatibility issue of Xamarin.Appcombat (I found somewhere in web)

try to deploy the same project into lower Android API

in my case Android simulator API 21 had the error above , but another simulator with Android API 18 had no problem at all

Post a Comment for "Error Inflating Class Android.support.v7.widget.toolbar In Android Lollipop"