首先,對不起我的英文不好! 我是新來的,我是Android應用開發者的初學者!和我有一個問題:Android:「忽略錯誤日誌中的未知'WebView'XML元素」消息
它的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>
但是當我調試我的應用程序將在錯誤日誌窗口中顯示此錯誤:
AndroidManifest: Ignoring unknown 'WebView' XML element
編輯:問題解決,上面的代碼被修改和正確的代碼!
您是否想要在webview上加載html數據或者您想要在webview上加載url? – Sumant
@Sumant - 沒有什麼與INTERNET權限相關的,如果你認爲缺少... – evilone
@Sumat - 我想在webview的資產文件夾中加載html頁面。 –