Android 不是同一亲戚的兄弟姐妹吗
你好,我从Android开发开始。我只是在用ECLIPSE修改一个开源示例。我只修改了strings.xml和一些.png文件。在Android模拟器中,它工作得非常完美,但当我尝试生成签名的apk文件时,我收到两个描述类似的错误。这是其中之一(该行用*标记): Description@+id/about_us_desc_webview与cc3x_about_us.xml不是同一相对关系中的同级Android 不是同一亲戚的兄弟姐妹吗,android,eclipse,siblings,Android,Eclipse,Siblings,你好,我从Android开发开始。我只是在用ECLIPSE修改一个开源示例。我只修改了strings.xml和一些.png文件。在Android模拟器中,它工作得非常完美,但当我尝试生成签名的apk文件时,我收到两个描述类似的错误。这是其中之一(该行用*标记): Description@+id/about_us_desc_webview与cc3x_about_us.xml不是同一相对关系中的同级 <RelativeLayout xmlns:android="http://schemas.a
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_background"
android:orientation="vertical" >
<include
android:id="@+id/cc3x_about_header_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/cc3x_headerlayout" />
<TextView
android:id="@+id/about_us_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cc3x_about_header_view"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/about_title_label_top_margin"
android:text="@string/about_us_label"
android:textColor="@color/grey_text_color"
android:textSize="@dimen/extra_large_text_size"
android:textStyle="bold" />
<View
android:id="@+id/view1"
android:layout_width="fill_parent"
android:layout_height="@dimen/min_divider_height"
android:layout_below="@+id/about_us_textview"
android:layout_marginLeft="@dimen/about_title_label_side_margin"
android:layout_marginRight="@dimen/about_title_label_side_margin"
android:background="@drawable/about_page_divline" />
<WebView
android:id="@+id/about_us_desc_webview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/view1"
android:layout_marginLeft="@dimen/about_title_label_side_margin"
android:layout_marginRight="@dimen/about_title_label_side_margin"
android:layout_marginTop="@dimen/min_margin_cutoff" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/about_us_desc_webview" >
<TextView
android:id="@+id/about_screen_contact_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
* android:layout_below="@+id/about_us_desc_webview"
android:layout_centerHorizontal="true"
android:text="@string/contact_label"
android:textColor="@color/grey_text_color"
android:textSize="25dip"
android:textStyle="bold" />
<View
android:id="@+id/divider_bottom"
android:layout_width="match_parent"
android:layout_height="@dimen/min_divider_height"
android:layout_below="@+id/about_screen_contact_label"
android:layout_marginLeft="@dimen/about_title_label_side_margin"
android:layout_marginRight="@dimen/about_title_label_side_margin"
android:background="@drawable/about_page_divline" />
<TextView
android:id="@+id/about_xcube_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/divider_bottom"
android:layout_margin="@dimen/max_margin_size"
android:autoLink="web"
android:text="@string/xcube_url"
android:textColor="@color/blue_text_color"
android:textColorLink="@color/blue_text_color"
android:textSize="10dip" />
<TextView
android:id="@+id/about_xcube_contact_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/divider_bottom"
android:layout_margin="@dimen/max_margin_size"
android:autoLink="email"
android:text="@string/xcube_contact_email"
android:textSize="@dimen/small_text_height" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/about_xcube_link"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="@string/about_xcube_address"
android:textColor="@color/grey_text_color"
android:textSize="@dimen/small_text_height" />
</RelativeLayout>
</RelativeLayout>
任何帮助都将不胜感激。非常感谢 线路
android:layout_below="@+id/about_us_desc_webview"
在您的文本视图中是多余的。因为RelativeLayout已经具有该属性,所以它是无用的。你可以删除那一行,什么都不应该改变
它产生错误的原因是,您可以应用下面、上面的功能。。等与同一布局中的元素。这里的“about_us_desc_webview”不属于RelativeLayout,您不能将RelativeLayout内部的内容与RelativeLayout外部的内容放在一起。
将此视图的上边缘定位在给定的定位点视图ID下方
何时出现
//
正道
//
如果转到“属性”面板,您将看到布局:alignComponent的某些对齐方式显示为“未找到”。把它清理掉。在上面的示例属性窗口->文本视图->布局:对齐组件检查所有对齐值。只需从布局中删除导致错误的行即可 .xml文件 尝试刷新布局 你的布局可能会改变。您现在可以正确重置它
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/colorWhite"
android:id="@+id/rl_rootHeader"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rl_Header"
android:layout_below="@+id/rl_rootHeader" // Arise ,In here RelativeLayout is Parent .
>
//
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:fillViewport="true"
android:id="@+id/scrollRoot"
android:background="@color/colorWhite"
>
</ScrollView>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/colorWhite"
android:id="@+id/rl_rootHeader"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rl_Header"
>
//
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:fillViewport="true"
android:id="@+id/scrollRoot"
android:background="@color/colorWhite"
android:layout_below="@+id/rl_rootHeader" // Call Here .This section is Child
>
</ScrollView>