element LinearLayout must be declared

Your layout files must be in res/layout folder.

Providing Resources


Make sure you have action_settings defined inside menu's xml file

res/menu/yourmenufile.xml

like this :

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.example.app" >

    <item android:id="@+id/action_settings"
        android:title="@string/action_settings"
        android:orderInCategory="100"
        app:showAsAction="never" />
</menu>

Had the same Error. Problem was, i had my dialogfragment layout in the menu folder instead of the layout folder