【问题标题】:Android resource linking failed when using layout_gravity="bottom||end" xml使用 layout_gravity="bottom||end" xml 时 Android 资源链接失败
【发布时间】:2019-09-21 09:25:42
【问题描述】:

我试图将我的FAB 放在屏幕右侧的Bottom 上。但是每次我buildapp 时,如果我使用android:layout_gravity="bottom||end",它总是以AAPT error 失败

这里是详细的错误: Android 资源链接失败

AAPT:错误:'bottom||end' 与属性 layout_gravity (attr) 标志不兼容 [bottom=80,center=17,center_horizo​​ntal=1,center_vertical=16,clip_horizo​​ntal=8,clip_vertical=128,end=8388613 , fill=119, fill_horizo​​ntal=7, fill_vertical=112, left=3, right=5, start=8388611, top=48]。

我已经尝试使用android:layout_gravity="bottom" 并且效果很好。

有人可以帮我解决这个问题吗?

【问题讨论】:

    标签: android xml android-studio floating-action-button androidx


    【解决方案1】:

    使用

    android:layout_gravity="bottom|end"
    

    而不是

    android:layout_gravity="bottom||end"
    

    【讨论】:

      猜你喜欢
      • 2019-02-01
      • 1970-01-01
      • 2019-05-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多