首先,对不起我的英文不好! 我是新来的,我是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页面。 –