Dusan Dimitrijevic
Dusan Dimitrijevic

Reputation: 3219

When i'm testing the application in Android Studio i get this error:

here is the error i'm getting and i would appricieate some help from you guys:

Caused by: android.view.InflateException: You must specifiy a layout in the include tag: <include layout="@layout/layoutID" />

Here are my <include layout="@layout/layoutID" /> in activty_main.xml:

<include
android:layout="@layout/app_bar"
android:id="@+id/app_bar"/>

and here are my app_bar layout:

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary">

Please can someone help me with this. I'm new here in java programming.

Upvotes: 0

Views: 62

Answers (1)

Oleg Osipenko
Oleg Osipenko

Reputation: 2430

Your exception message's already containing an answer: change include android:layout="@layout/app_bar" to include layout="@layout/app_bar"

Upvotes: 1

Related Questions