Skip to content Skip to sidebar Skip to footer

Error Inflating Class Android.support.v7.app.mediaroutebutton

I've added the android-support-v7-appcompat,android-support-v7-mediarouter library project to build path. following are my main activity and no errors for import the button, but wh

Solution 1:

First of all you should replace this

<android.support.v7.app.`MediaRouteButton`
        android:id="@+id/castbutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="2"
        >
</android.support.v7.app.MediaRouteButton>

With

<android.support.v7.app.MediaRouteButton
        android:id="@+id/castbutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="2"
        >
</android.support.v7.app.MediaRouteButton>

Update: You must appcompat referecning first. To add appcompat library into your Follow the steps Right Click Project--> go to properties--> android ---> ib tab to add the appcompat project.

Post a Comment for "Error Inflating Class Android.support.v7.app.mediaroutebutton"