I've set my targetSdkVersion to 29 in build.gradle and now I'm getting the following lint error:
"Redundant attribute layout_marginLeft; already defining layout_marginStart with targetSdkVersion 29"
on this 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?
If your minSdk = 16, you should keep android:layout_marginLeft
, otherwise you can remove it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.