gpt4 book ai didi

java - 二进制 XML 文件行 #32 : You must supply a layout_height attribute

转载 作者:行者123 更新时间:2023-12-02 04:09:41 27 4
gpt4 key购买 nike

我遇到了这个 xml 问题。我检查了我的代码,我很确定所有布局高度都已实现。

<RelativeLayout 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"
xmlns:wheel="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.PostPreview">
<ImageView
android:id="@+id/iv_viewPhotoFull"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:src="@drawable/ic_back" />

<TextView
android:id="@+id/tvCaption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/relativePostDetails"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:fontFamily="@font/baloo_thambi"
android:text="Sample photo label"
android:textSize="16sp" />

<RelativeLayout
android:id="@+id/relativePostDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/relativeComment"
android:layout_marginBottom="16dp">

<LinearLayout
android:id="@+id/linear_likesCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:background="@drawable/rounded_corner1"
android:backgroundTint="@color/colorPrimaryLight"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp">

<com.androidapp.instasocial.ui.CompatTextView
android:id="@+id/like_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:text="@string/like_icon"
android:textColor="@color/black"
android:textSize="@dimen/feed_options_icon_size"
android:visibility="visible"
wheel:fontPath="@string/font_fontawesome" />

<com.androidapp.instasocial.ui.CompatTextView
android:id="@+id/tv_likecount"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="6dp"
android:layout_marginLeft="6dp"
android:fontFamily="@font/baloo_thambi"
android:gravity="center_vertical"
android:text="32"
android:textColor="@color/txtColor"
android:textSize="10sp" />
</LinearLayout>

<LinearLayout
android:id="@+id/linear_viewsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_toRightOf="@id/linear_likesCount"
android:background="@drawable/rounded_corner1"
android:backgroundTint="@color/colorPrimaryLight"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp">

<ImageView
android:id="@+id/ic_Seen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:tint="@color/txtColor"
android:visibility="visible"
app:srcCompat="@drawable/ic_visibility_mt" />

<com.androidapp.instasocial.ui.CompatTextView
android:id="@+id/tv_viewsCount"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="6dp"
android:layout_marginLeft="6dp"
android:fontFamily="@font/baloo_thambi"
android:gravity="center_vertical"
android:text="32"
android:textColor="@color/txtColor"
android:textSize="10sp" />
</LinearLayout>

<LinearLayout
android:id="@+id/linear_commentsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_toRightOf="@id/linear_viewsCount"
android:background="@drawable/rounded_corner1"
android:backgroundTint="@color/pink_200"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingRight="8dp">

<ImageView
android:id="@+id/ic_Comments"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:gravity="center"
android:padding="2dp"
android:tint="@color/white"
android:visibility="visible"
app:srcCompat="@drawable/ic_comment_bubble" />

<com.androidapp.instasocial.ui.CompatTextView
android:id="@+id/tv_commentsCount"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="6dp"
android:layout_marginLeft="6dp"
android:fontFamily="@font/baloo_thambi"
android:gravity="center_vertical"
android:text="32"
android:textColor="@color/white"
android:textSize="10sp" />
</LinearLayout>

<LinearLayout
android:id="@+id/linearActions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginRight="16dp"
android:orientation="horizontal">

<ImageView
android:id="@+id/iv_sendMessage"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_marginRight="8dp"
android:rotation="320"
android:tint="@color/white"
app:srcCompat="@drawable/ic_send_mt" />

<com.androidapp.instasocial.ui.CompatTextView
android:id="@+id/iv_like_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="8dp"
android:gravity="center"
android:text="@string/unlike_icon"
android:textColor="@color/white"
android:textSize="28sp"
android:visibility="visible"
wheel:fontPath="@string/font_fontawesome" />

<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/ivClickReward"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginRight="8dp"
android:src="@mipmap/ruon_new_app_icon"
android:visibility="visible" />

</LinearLayout>

</RelativeLayout>

<RelativeLayout
android:id="@+id/relativeComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp">

<EditText
android:id="@+id/edt_comment"
style="@style/Transparent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_black_outline"
android:hint="@string/add_a_new_comment"
android:paddingLeft="20dp"
android:paddingTop="16dp"
android:paddingRight="24dp"
android:paddingBottom="16dp" />

<ImageView
android:id="@+id/iv_sendComment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:rotation="320"
android:tint="@color/txtColor"
app:srcCompat="@drawable/ic_send_mt" />

</RelativeLayout>
</RelativeLayout>

这是我的日志:

android.view.InflateException: Binary XML file line #32: Binary XML file line #32: You must supply a layout_height attribute.
Caused by: java.lang.UnsupportedOperationException: Binary XML file line #32: You must supply a layout_height attribute.

最佳答案

No resource identifier found for attribute 'ProgressIndeterminate in package 'cn.pedant.sweetalert'

如果出现上述错误,则 enter link description here

关于java - 二进制 XML 文件行 #32 : You must supply a layout_height attribute,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56698081/

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