title: Android Library CardView attribute not found
body: <p>I have created a library that uses Android CardView. </p>
  
  <p>The library is available as aar file.</p>
  
  <p>When I add the aar file to the project, it gives the following error, on syncing. I still have not used it in the project</p>
  
  <pre><code>attribute for 'cardElevation' not found in com.sampleapp
  </code></pre>
  
  <p>How do I resolve this namespace issue? So anyone using the library does not have to add cardview to their gradle.</p>
  
  <p>library xml file using cardview</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/networkCard"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:cardUseCompatPadding="true"
      app:cardCornerRadius="@dimen/cardCornerRadius"
      app:cardElevation="6dp"
      app:cardPreventCornerOverlap="true"
      &gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/card_background"
          android:clipToPadding="false"&gt;
          &lt;ImageView
              android:id="@+id/source_type_icon"
              style="@style/ServiceConnectUIComponentsTheme"
              android:layout_alignParentTop="true"
              android:src="@drawable/ic_linkedin3x"
              android:tint="@android:color/white"
  
              /&gt;
          &lt;android.support.v7.widget.AppCompatTextView
              android:id="@+id/connect_to_source_rational"
              style="@style/ServiceConnectUIComponentsTheme"
              android:layout_centerInParent="true"
              android:text="Your LinkedIn account allows us to check your professional info, employment &amp;amp; education history"
              /&gt;
          &lt;FrameLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:layout_marginLeft="@dimen/connect_buttons_extra_margin"
              android:layout_marginStart="@dimen/connect_buttons_extra_margin"
              android:layout_marginEnd="@dimen/connect_buttons_extra_margin"
              android:layout_marginRight="@dimen/connect_buttons_extra_margin"
              android:layout_marginTop="@dimen/connect_button_margin"
              android:layout_marginBottom="@dimen/circle_indicator_connect_button_margin"
              &gt;
              &lt;Button
                  android:id="@+id/access_source"
                  android:text="Connect LinkedIn"
                  style="@style/Widget.AppCompat.Button.Colored"
                  android:background="@drawable/connect_data_button_drawable"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
  
                  android:elevation="10dp"
                  android:textAllCaps="false"
  
                  /&gt;
              &lt;com.UIUtils.HorizontalDottedProgress
                  android:id="@+id/connectDataProgress"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:visibility="gone"
                  &gt;&lt;/com.UIUtils.HorizontalDottedProgress&gt;
  
          &lt;/FrameLayout&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>The sampleapp/build.gradle</p>
  
  <pre><code>    apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.2"
      defaultConfig {
          applicationId "com.sampleapp"
          minSdkVersion 16
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
  }
     repositories {
        jcenter()
        flatDir {
          dirs 'libs'
        }
     }
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
        compile 'com.android.support:appcompat-v7:25.3.0'
        compile 'com.android.support.constraint:constraint-layout:1.0.0-beta1'
         testCompile 'junit:junit:4.12'
  
      compile project(':UI-release')
      }
  </code></pre>
  
  <p>Thanks</p>