qq_28128841
萝卜de坑
采纳率0%
2017-03-06 13:06

webview在源码中使用报错?

我在AS上编写的webview,能够成功使用,然后移植进源码,能够编译成功,但是总是报
webview,xml解析不正常,不知道是不是webview需要什么库,还是怎么回事,求大神解惑。

01-01 18:17:37.046 8595 8595 E AndroidRuntime: FATAL EXCEPTION: main
01-01 18:17:37.046 8595 8595 E AndroidRuntime: Process: com.example.timestatistics, PID: 8595
01-01 18:17:37.046 8595 8595 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.timestatistics/com.example.timestatistics.WebViewActivity}: android.view.InflateException:
Binary XML file line #7: Binary XML file line #7: Error inflating class android.webkit.WebView
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2730)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1481)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6135)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:929)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:819)
01-01 18:17:37.046 8595 8595 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class android.webkit.WebView
01-01 18:17:37.046 8595 8595 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class android.webkit.WebView
01-01 18:17:37.046 8595 8595 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

相关推荐