android.support.v7.widget.toolbar is not found in java file using android studio?
<p>I have created a toolbar xml file and want to add in MainActivity.</p>

<p>i have include toolbar.xml file in MainActivity layout file</p>

<p>Toolbar.xml code:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/dark_blue"&gt;

&lt;/android.support.v7.widget.Toolbar&gt;
</code></pre>

<p>Main Activity Xml Layout :</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="hogwart.harrypotter.bucketdrop.ActivityMain"&gt;

    &lt;include
        android:id="@+id/toolbar"
        layout="@layout/toolbar"/&gt;
    &lt;include layout="@layout/empty_drops"/&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p>Then i want to add toolbar to main activity via java code but here it shows one toolbar :</p>

<pre><code>import android.widget.Toolbar;
</code></pre>

<p>But support toolbar is not found :</p>

<pre><code>import android.support.v7.widget.Toolbar;
</code></pre>

<p>Main Activity Code:</p>

<pre><code>import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toolbar;

public class ActivityMain extends AppCompatActivity {

    Toolbar
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}
</code></pre>

<p>Gradle file code:</p>

<pre><code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "hogwart.harrypotter.bucketdrop"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
}
</code></pre>