[英]Android targetSdkVersion
我在 build.gradle 中将我的 targetSdkVersion 设置为 29,现在我收到以下 lint 错误:
“冗余属性 layout_marginLeft;已经使用 targetSdkVersion 29 定义 layout_marginStart”
在这个 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}" />
我的问题是,如果我执行推荐的操作并从 TextView 中删除 layout_marginLeft,这会导致运行 sdk 小于 29 的手机出现问题吗?
如果你的 minSdk = 16,你应该保留android:layout_marginLeft
,否则你可以删除它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.