
Android
小新Kelvin
平实
展开
-
android.support.annotation系列包找不到了,解决办法替换成androidx.annotation
问题描述: 在GitHub上找到的项目,导进自己的项目之后发现以下android.support.annotation系列包找不到了 原因分析: 这是v4包和AndroidX之间的一些乱七八糟的bug 解决方案: 官方建议我们使用AndroidX来替代v4\v7 首先你要在gradle.properties中开启 android.useAndroidX=true android.enableJetifier=true 第二步,将以上找不到的包注释掉,重新导入,在标红的地方按(alt+enter),原创 2020-12-11 09:56:47 · 3370 阅读 · 1 评论 -
Android相对布局属性一览
RelativeLayout布局 android:layout_marginTop=“25dip” //顶部距离 android:gravity=“left” //空间布局位置 android:layout_marginLeft="15dip //距离左边距 // 相对于给定ID控件 android:layout_above 将该控件的底部置于给定ID的控件之上; android:layout_below 将该控件的底部置于给定ID的控件之下; android:layout_toLeftOf 将该控件转载 2020-12-03 11:03:58 · 603 阅读 · 0 评论