开发者

Android : "Ignoring unknown 'WebView' XML element" message in Error log

开发者 https://www.devze.com 2023-03-21 01:07 出处:网络
first,sorry for my bad English!! i\'m new here and i\'m a beginner of android apps developer! and i have a problem:

first,sorry for my bad English!! i'm new here and i'm a beginner of android apps developer! and i have a problem:

it's main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <TextView
        android:id= "@+id/txtv"     
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="@string/hello"/>
    <WebView 
        android:id="@+id/webv" 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent"/>  
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <Button
            android:id = "@+id/backButton"
            android:text="@string/bText"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"/>   
        <Button
            android:id = "@+id/forwardButton"
            android:text="@string/fText"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"/>
        >
    </LinearLayout>
    >
</LinearLayout>

but when i debug my app this error will be shown in ErrorLog window:

AndroidManifest: Ignoring unknown 'WebView' X开发者_运维问答ML element

edit: problem solved and the above code is modified and correct code!!


Remove this part of the code from WebView xmlns:android="http://schemas.android.com/apk/res/android" and add android:layout_width and android:layout_height properties to your buttons.

0

精彩评论

暂无评论...
验证码 换一张
取 消