[英]Android targetSdkVersion
I've set my targetSdkVersion to 29 in build.gradle and now I'm getting the following lint error:我在 build.gradle 中将我的 targetSdkVersion 设置为 29,现在我收到以下 lint 错误:
"Redundant attribute layout_marginLeft; already defining layout_marginStart with targetSdkVersion 29" “冗余属性 layout_marginLeft;已经使用 targetSdkVersion 29 定义 layout_marginStart”
on this TextView:在这个 TextView 上:
<TextView
android:id="@+id/description"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:text="@{dto.description}" />
My question is, if I do what is recommended and remove layout_marginLeft from the TextView will this cause problems on phones running an sdk less than 29?我的问题是,如果我执行推荐的操作并从 TextView 中删除 layout_marginLeft,这会导致运行 sdk 小于 29 的手机出现问题吗?
If your minSdk = 16, you should keep android:layout_marginLeft
, otherwise you can remove it.如果你的 minSdk = 16,你应该保留
android:layout_marginLeft
,否则你可以删除它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.