安卓原生跳转H5页面崩溃,请求大神指点

狂野的夏天 2018-02-24 09:54:24
02-24 09:50:34.249 19785-19785/? E/bonc_crash_log: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bonc.mobile.sh.external.sale.activity/com.bonc.mobile.sh.sale.webview.ShAppWebViewActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2872)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2937)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1645)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6451)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1134)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:210)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2947)
at android.content.res.Resources.getLayout(Resources.java:1295)
at android.view.LayoutInflater.inflate(LayoutInflater.java:424)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.bonc.mobile.plugin.webview.WebViewBaseActivity.onCreate(SourceFile:65)
at com.bonc.mobile.plugin.webview.SecondLevelWebActvity.onCreate(SourceFile:68)
at android.app.Activity.performCreate(Activity.java:6765)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
at cn.jiguang.a.a.d.a.a.d.callActivityOnCreate(Unknown Source)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2825)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2937) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1645) 
at android.os.Handler.dispatchMessage(Handler.java:110) 
at android.os.Looper.loop(Looper.java:203) 
at android.app.ActivityThread.main(ActivityThread.java:6451) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1134) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995) 
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:210)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2947)
at android.content.res.Resources.getLayout(Resources.java:1295)
at android.view.LayoutInflater.inflate(LayoutInflater.java:424)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.bonc.mobile.plugin.webview.WebViewBaseActivity.onCreate(SourceFile:65)
at com.bonc.mobile.plugin.webview.SecondLevelWebActvity.onCreate(SourceFile:68)
at android.app.Activity.performCreate(Activity.java:6765)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
at cn.jiguang.a.a.d.a.a.d.callActivityOnCreate(Unknown Source)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2825)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2937)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1645)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6451)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1134)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
...全文
774 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
儿大不由爷 2018-02-24
  • 打赏
  • 举报
回复
是不是手机里没有webview
  • 打赏
  • 举报
回复
你看下这个页面的XML 有资源找不到
Android小码家 2018-02-24
  • 打赏
  • 举报
回复
这个是你Activity布局中有资源引用找不到造成的,Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0 说的很清楚了。
booooo­ 2018-02-24
  • 打赏
  • 举报
回复
首先,去
com.bonc.mobile.plugin.webview.WebViewBaseActivity
这个类中的
onCreate
方法里,第65行,一定有一个对资源引用的调用。 去查查看,这个资源存在吗?或者这个资源ID和布局中的ID一致吗? 如果以上都没问题,Clean下项目再Build一次试试。

80,350

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧