title: Android studio error on logcat Attribute "xmlns:card_view" was already specified for element "android.support.v7.widget.CardView"
body: <p>I'm getting the following error on LogCat when I try to build and run the app. In my app I've used Cardview to display the edittext and textview. When I try to run the app, it shows me the following error:</p>
  
  <pre><code>Attribute "xmlns:card_view" was already specified for element "android.support.v7.widget.CardView".
  </code></pre>
  
  <p>It's only displaying this information and it's not even showing me the exact location where the problem is.</p>
  
  <p>Here's the XML which contains the CardView:</p>
  
  <p>activity_basic_info:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:layout_width="match_parent"
              android:layout_height="@dimen/_46sdp"&gt;
  
  
              &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"&gt;
  
  
                  &lt;ImageView
                      android:layout_width="@dimen/_30sdp"
                      android:layout_height="@dimen/_30sdp"
                      android:layout_marginTop="@dimen/_8sdp"
                      android:src="@drawable/ic_arrow_back_black_24dp"/&gt;
  
  
  
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:textColor="@android:color/white"
                      android:textStyle="bold"
                      android:layout_centerInParent="true"
                      android:textSize="@dimen/_16sdp"
                      android:text="@string/basic_info_header"/&gt;
  
              &lt;/RelativeLayout&gt;
  
  
  
          &lt;/android.support.v7.widget.Toolbar&gt;
  
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.widget.NestedScrollView
          app:layout_behavior="@string/appbar_scrolling_view_behavior"
          android:layout_width="match_parent"
          android:background="@android:color/white"
          android:layout_height="match_parent"&gt;
  
  
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@android:color/white"
              android:orientation="vertical"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@android:color/white"
                  android:orientation="horizontal"&gt;
  
                  &lt;ImageView
                      android:layout_width="@dimen/_25sdp"
                      android:layout_height="@dimen/_25sdp"
                      android:layout_marginTop="@dimen/_30sdp"
                      android:src="@drawable/contact_info"
                      android:layout_marginStart="@dimen/_40sdp"/&gt;
  
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginHorizontal="@dimen/_8sdp"
                      android:layout_marginTop="@dimen/_34sdp"
                      android:text="@string/contact_info_text"
                      android:textStyle="bold"
                      android:textColor="@color/textColor"
                      android:textSize="@dimen/_12sdp"/&gt;
              &lt;/LinearLayout&gt;
  
  
  
  
              &lt;android.support.v7.widget.CardView
  
                  android:id="@+id/cardView"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginStart="@dimen/_25sdp"
                  android:layout_marginEnd="@dimen/_25sdp"
                  android:layout_marginTop="@dimen/_25sdp"
                  app:cardCornerRadius="@dimen/_10sdp"
                  app:cardElevation="@dimen/_10sdp"&gt;
  
                  &lt;LinearLayout
  
                      android:background="@drawable/bg_layout"
                      android:layout_width="match_parent"
                      android:paddingBottom="@dimen/_2sdp"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center"
                      android:orientation="vertical"&gt;
  
  
  
                      &lt;LinearLayout
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"&gt;
  
                      &lt;TextView
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:paddingBottom="@dimen/_15sdp"
                          android:paddingTop="@dimen/_15sdp"
                          android:paddingEnd="@dimen/_10sdp"
                          android:gravity="end"
                          android:textColor="@android:color/white"
                          android:background="@color/colorPrimary"
                          android:text="Name"/&gt;
  
  
                          &lt;EditText
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="2"
                              android:paddingTop="@dimen/_15sdp"
                              android:paddingStart="@dimen/_10sdp"
                              android:paddingBottom="@dimen/_15sdp"
                              android:background="@android:color/transparent"
                              android:hint="First and Last name"
                              android:textSize="@dimen/_10sdp"/&gt;
  
                      &lt;/LinearLayout&gt;
                      &lt;View
                          android:layout_width="match_parent"
                          android:layout_height="1dp"
                          android:background="#e2e2e2" /&gt;
  
  
  
                      &lt;LinearLayout
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"&gt;
  
                          &lt;TextView
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="1"
                              android:paddingBottom="@dimen/_15sdp"
                              android:paddingTop="@dimen/_15sdp"
                              android:paddingEnd="@dimen/_10sdp"
                              android:gravity="end"
                              android:textColor="@android:color/white"
                              android:background="@color/colorPrimary"
                              android:text="Email"/&gt;
  
  
                          &lt;EditText
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="2"
                              android:paddingTop="@dimen/_15sdp"
                              android:paddingStart="@dimen/_10sdp"
                              android:paddingBottom="@dimen/_15sdp"
                              android:background="@android:color/transparent"
                              android:hint="Email Address"
                              android:textSize="@dimen/_10sdp"/&gt;
  
                      &lt;/LinearLayout&gt;
  
  
                      &lt;View
                          android:layout_width="match_parent"
                          android:layout_height="1dp"
                          android:background="#e2e2e2" /&gt;
  
  
                      &lt;LinearLayout
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"&gt;
  
                          &lt;TextView
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="1"
                              android:paddingBottom="@dimen/_15sdp"
                              android:paddingTop="@dimen/_15sdp"
                              android:paddingEnd="@dimen/_10sdp"
                              android:gravity="end"
                              android:textColor="@android:color/white"
                              android:background="@color/colorPrimary"
                              android:text="Phone"/&gt;
  
  
                          &lt;EditText
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="2"
                              android:paddingTop="@dimen/_15sdp"
                              android:paddingStart="@dimen/_10sdp"
                              android:paddingBottom="@dimen/_15sdp"
                              android:background="@android:color/transparent"
                              android:hint="Phone Number"
                              android:textSize="@dimen/_10sdp"/&gt;
  
                      &lt;/LinearLayout&gt;
  
  
                  &lt;/LinearLayout&gt;
  
              &lt;/android.support.v7.widget.CardView&gt;
  
  
              &lt;View
                  android:layout_width="match_parent"
                  android:layout_height="@dimen/_1sdp"
                  android:layout_marginTop="@dimen/_20sdp"
                  android:layout_marginStart="@dimen/_20sdp"
                  android:layout_marginEnd="@dimen/_20sdp"
                  android:background="#bababa"/&gt;
  
  
          &lt;/LinearLayout&gt;
  
  
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>My build.gradle :</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      dataBinding
              {
                  enabled = true
              }
  
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.newproject"
          minSdkVersion 22
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      //noinspection GradleCompatible
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.android.support:support-vector-drawable:28.0.0'
      //noinspection GradleDependency
      implementation 'com.android.support:support-v4:28.0.0-alpha1'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      //rest services
      implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
      implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
      //design
      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.android.support:recyclerview-v7:28.0.0'
      //image binding
      implementation 'com.squareup.picasso:picasso:2.71828'
      //design libraries
      implementation 'com.android.support:design:28.0.0'
      //reactive programming
      implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
      implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
      //data binding
      implementation 'android.arch.lifecycle:extensions:1.1.1'
      implementation 'android.arch.lifecycle:livedata:1.1.1'
      annotationProcessor 'android.arch.lifecycle:compiler:1.1.1'
      implementation 'android.arch.lifecycle:viewmodel:1.1.1'
      //sdp library
      implementation 'com.intuit.sdp:sdp-android:1.0.3'
      implementation 'com.android.support:design:28.0.0'
      //circle image Viewer
      implementation 'de.hdodenhof:circleimageview:3.0.0'
  
  }
  </code></pre>
  
  <p>I have already tried:</p>
  
  <ul>
  <li><p>Clean Project</p></li>
  <li><p>Rebuild Project</p></li>
  <li><p>Invalidate caches and restarted the android studio. </p></li>
  </ul>
  
  <p>But nothing worked out.</p>