gpt4 book ai didi

Android: Urban Airship 6.0.1: android:elevation 找不到与给定名称匹配的资源

转载 作者:太空宇宙 更新时间:2023-11-03 12:17:32 24 4
gpt4 key购买 nike

我正在尝试将 Urban Airship Library 添加到我的项目中。我完全按照这些步骤操作,但是当我构建时出现此错误

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>

这是我的gradle文件依赖

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'

我的 targetSdkVersion 是 21,我还从 SDK 管理器更新了我的 API

http://docs.urbanairship.com/platform/android.html供引用

请帮帮我。谢谢!

更新 1:gradle 中的 Android 部分

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

最佳答案

尝试将 compileSdkVersion 设置为 21

关于Android: Urban Airship 6.0.1: android:elevation 找不到与给定名称匹配的资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29705006/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com