w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Error inflating class android.support.v7.app.MediaRouteButton

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.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.