我正在尝试执行程序但遇到以下错误。xml
如下
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<ViewFlipper android:id="@+id/ViewFlipper"
android:layout_width="fill_parent" android:layout_height="fill_parent">
</ViewFlipper>
<LinearLayout android:id="@+id/BarLayout"
android:layout_toRightOf="@+id/GoBtn" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:scaleType="fitXY"
android:background="@drawable/tb_background_top" android:weightSum="0.75"
android:layout_alignParentTop="true" android:orientation="vertical">
<ProgressBar android:id="@+id/WebViewProgress"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:indeterminate="false" style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_marginLeft="3dip" android:layout_marginRight="3dip" android:layout_marginTop="3dip"
android:maxHeight="5px" android:minHeight="5px"></ProgressBar>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton android:layout_height="wrap_content"
android:id="@+id/ToolsBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dip"
android:layout_marginRight="0dip"
android:src="@drawable/fav_icn_default"></ImageButton>
<AutoCompleteTextView android:layout_height="wrap_content" android:id="@+id/UrlText"
android:layout_marginTop="3dip"
android:layout_marginLeft="0dip"
android:layout_marginRight="0dip"
android:layout_width="fill_parent"
android:layout_weight="0.75"
android:dropDownHeight="wrap_content"
android:dropDownWidth="fill_parent"
android:inputType="textUri"></AutoCompleteTextView>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/GoBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons"
android:layout_gravity="center_vertical"
android:layout_marginLeft="0dip"
android:layout_marginRight="3dip"
android:src="@drawable/ic_btn_go"></ImageButton>
</LinearLayout>
</LinearLayout>
<LinearLayout android:id="@+id/findControls" android:layout_width="match_parent"
android:layout_alignParentTop="true"
android:layout_height="wrap_content" android:paddingTop="5dip"
android:paddingLeft="4dip" android:paddingRight="4dip"
android:paddingBottom="1dip" android:background="@android:drawable/bottom_bar">
<ImageButton android:src="@drawable/ic_btn_find_prev"
android:id="@+id/find_previous" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageButton android:src="@drawable/ic_btn_find_next"
android:id="@+id/find_next" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_weight="1"
android:orientation="vertical" android:layout_marginRight="6dip">
<EditText android:id="@+id/find_value" android:layout_width="match_parent"
android:layout_height="wrap_content" android:scrollHorizontally="true"
android:singleLine="true" android:ellipsize="end"
android:inputType="text" android:hint="@string/SearchDialog.Hint" />
</LinearLayout>
<ImageButton android:id="@+id/find_close"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_btn_close_panel" />
</LinearLayout>
<ImageView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:src="@drawable/bubbleright48"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true" android:id="@+id/BubbleRightView"></ImageView>
<ImageView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:src="@drawable/bubbleleft48"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:id="@+id/BubbleLeftView"></ImageView>
<ImageView android:id="@+id/PreviousTabView"
android:src="@drawable/previous_tab"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentLeft="true" android:layout_centerVertical="true"></ImageView>
<ImageView android:id="@+id/NextTabView"
android:src="@drawable/next_tab"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentRight="true" android:layout_centerVertical="true"></ImageView>
<LinearLayout android:id="@+id/BottomBarLayout"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="@drawable/tb_background_bottom" android:scaleType="fitXY"
android:layout_alignParentBottom="true" android:weightSum="5">
<ImageButton android:layout_height="wrap_content"
android:id="@+id/PreviousBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:layout_marginTop="7dip"
android:layout_marginLeft="3dip"
android:src="@drawable/ic_btn_next" android:layout_weight="1"></ImageButton>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/RemoveTabBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:layout_marginTop="7dip"
android:layout_marginLeft="3dip"
android:src="@drawable/ic_btn_close_tab" android:layout_weight="1"></ImageButton>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/QuickBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:layout_marginTop="7dip"
android:layout_marginLeft="3dip"
android:src="@drawable/ic_btn_bookmarks" android:layout_weight="1"></ImageButton>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/NewTabBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:layout_marginTop="7dip"
android:layout_marginLeft="3dip"
android:src="@drawable/ic_btn_open_tab" android:layout_weight="1"></ImageButton>
<ImageButton android:layout_height="wrap_content"
android:id="@+id/NextBtn" android:layout_width="wrap_content"
android:background="@drawable/buttons_bottom"
android:layout_marginTop="7dip"
android:layout_marginLeft="3dip"
android:layout_marginRight="3dip"
android:src="@drawable/ic_btn_forward" android:layout_weight="1"></ImageButton>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
错误是
1)Error:(16) Error: @+id/GoBtn is not a sibling in the same RelativeLayout [NotSibling]
android:layout_toRightOf="@+id/GoBtn" android:layout_width="fill_parent"
2)Error:Execution failed for task ':app:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}``
}
...
答案 0 :(得分:1)
问题在于:
<LinearLayout android:id="@+id/BarLayout"
android:layout_toRightOf="@+id/GoBtn"
您正在尝试将此LinearLayout与