gpt4 book ai didi

Android:向后兼容(Android L -> Jelly Bean)

转载 作者:太空狗 更新时间:2023-10-29 14:13:20 25 4
gpt4 key购买 nike

所以我创建了一个 Android L 应用程序,但我希望它与 4.3 及更高版本兼容,

我在 res 中的文件夹看起来像这样

values-v18
theme.xml
values-v19
theme.xml
values-v20
theme.xml
values-v21
theme.xml

我的 manifest.xml(Android Studio 说它被忽略,因为我有 gradle)

<uses-sdk android:targetSdkVersion="18" android:minSdkVersion="18" />

我的build.gradle

dependencies {
compile 'com.android.support:support-v4:20.+'
compile 'com.android.support:support-v13:20.+'
compile 'com.android.support:appcompat-v7:+'
}

android {
compileSdkVersion 'android-18' <-- this breaks all Android-L stuff
buildToolsVersion '19.1.0'
....

values-v21/theme.xml是失败的地方,比如

Cannot resolve symbol 'android:Theme.Material.Light'

以及所有仅适用于 android-L 的东西。

我在这里错过了什么?

最佳答案

目前,据我所知,在使用L的东西时,只能使用LminSdkVersion

关于Android:向后兼容(Android L -> Jelly Bean),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24870081/

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