I get this weird Error after adding a Spinner, it worked. I tried to fix some margin for it. Tried building it got this error

Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]

So, I tried removing the stuff I added. Didn't work. I tried clean the build project and rebuild, no success. It tried looking for a solution on stackoverflow. I came across, added multiDexEnabled true this to my app.gradle, no success.I also followed the documentation for it on Android link: <https://developer.android.com/studio/build/multidex.html>

This didn't work neither, so I came here my self. My gradle files:

app.gradle

```
apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.meyil.androidlearning"
        minSdkVersion 15
        targetSdkVersion 26
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:design:26.1.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.firebaseui:firebase-ui-database:3.2.1'
    implementation 'id.zelory:compressor:2.1.0'
    implementation 'com.squareup.okhttp:okhttp:2.5.0'
    implementation 'com.android.support:multidex:1.0.2'
}

apply plugin: 'com.google.gms.google-services'

```

AndroidManifest.xml

```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.meyil.androidlearning">

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:name="android.support.multidex.MultiDexApplication"
        android:allowBackup="true"
        android:icon="@mipmap/spaced_launcher_logo"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/spaced_launcher_logo_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <service android:name=".FirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".StartActivity" />
        <activity
            android:name=".RegisterActivity"
            android:parentActivityName=".StartActivity" />
        <activity
            android:name=".LoginActivity"
            android:parentActivityName=".StartActivity" />
        <activity android:name=".SettingsActivity" />
        <activity
            android:name=".StatusActivity"
            android:parentActivityName=".SettingsActivity" />
        <activity
            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
            android:theme="@style/Base.Theme.AppCompat" />
        <activity
            android:name=".UsersActivity"
            android:parentActivityName=".MainActivity" />
        <activity android:name=".ProfileActivity">
            <intent-filter>
                <action android:name="com.example.meyil.androidlearning_TARGET_NOTIFICATION" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:name=".ChatActivity"
            android:parentActivityName=".MainActivity"></activity>
    </application>

</manifest>

```

build.gradle

```
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

```