gpt4 book ai didi

Android assemble build 搞砸了 GUI

转载 作者:行者123 更新时间:2023-12-03 05:07:12 26 4
gpt4 key购买 nike

我有以下 fragment 接口(interface):

enter image description here

从 Android Studio 运行应用程序时显示良好。但是,当我使用 assemble(例如 assembleDebug)运行构建时,界面会像这样困惑:

enter image description here

这是 fragment 的布局 XML:

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<data>
<variable
name="viewmodel"
type="com.blablabla.presentation.vehicleinspection.viewmodel.VehicleCheckDamagesBottomSheetViewmodel" />
</data>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWhite"
android:orientation="vertical"
android:paddingBottom="@dimen/space_large">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
android:padding="@dimen/space_small">

<TextView
style="@style/TextMedium.Light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/space_special"
android:text="@{viewmodel.title}"
tools:text="@tools:sample/lorem" />

</FrameLayout>

<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/space_normal"
app:adapter="@{viewmodel.adapter}"
app:layoutManager="android.support.v7.widget.GridLayoutManager"
app:spanCount="2"
app:useDefaultMargins="true" />

</LinearLayout>

</layout>

最佳答案

检查您的 app/src/debug 文件夹,当您组装特定的构建变体时,它将首先检查该变体的 Assets 。

与 app/src/main 中的内容相比,您可能有不同的 res/values/dimens.xml 文件和值

关于Android assemble build 搞砸了 GUI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56042658/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com