I have created a toolbar xml file and want to add in MainActivity.

i have include toolbar.xml file in MainActivity layout file

Toolbar.xml code:

```
<?xml version="1.0" encoding="utf-8"?>
<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">

</android.support.v7.widget.Toolbar>

```

Main Activity Xml Layout :

```
<?xml version="1.0" encoding="utf-8"?>
<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">

    <include
        android:id="@+id/toolbar"
        layout="@layout/toolbar"/>
    <include layout="@layout/empty_drops"/>
</RelativeLayout>

```

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

```
import android.widget.Toolbar;

```

But support toolbar is not found :

```
import android.support.v7.widget.Toolbar;

```

Main Activity 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);
    }
}

```

Gradle file 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'
}

```