Android: Urban Airship 6.0.1: android: altitude no resource found matching the specified name

I am trying to add Urban Airship library to my project. I followed the steps exactly, but when I build I get this error

No resource found that matches the given name: attr'android:elevation'


    <?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/Users/build/workspace/android-library/UrbanAirship/src/main/res/values-v21/styles.xml -->
    <eat-comment/>
    <style name="Widget.UrbanAirship.InAppMessage.Banner" parent="Base.Widget.UrbanAirship.InAppMessage.Banner">
        <item name="android:background">@drawable/ua_iam_background</item>
        <item name="android:elevation">@dimen/ua_iam_banner_elevation</item>
    </style>
</resources>

      

These are my dependent gradle files

compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.google.android.gms:play-services-gcm:7.0.0'
compile 'com.google.android.gms:play-services-location:7.0.0'

      

My targetSdkVersion is 21 and I have also updated my APIs from SDK manager

http://docs.urbanairship.com/platform/android.html for reference

Please help me. Thank!

UPDATE 1: Android part in gradle

android {
    compileSdkVersion 19
    buildToolsVersion "21.1.1"

    defaultConfig {
        applicationId "com.example"
        minSdkVersion 14
        targetSdkVersion 21
        multiDexEnabled true
        renderscriptTargetApi 22
        renderscriptSupportModeEnabled true
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}

      

+3


source to share


1 answer


Try setting compileSdkVersion to 21



+7


source







All Articles