java - 没有 ID 的 android.content.res.Resources$NotFoundException
问题描述
我尝试了我的应用程序,但没有任何错误,但我将其上传到 Play 商店,我在“ANR 错误和阻止”中看到一个“android.content.res.Resources$NotFoundException”,它没有 ID 或要搜索的内容它在我的代码或我的文件中。
块是这样的:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2339)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2389)
at android.app.ActivityThread.access$900 (ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1282)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:146)
at android.app.ActivityThread.main (ActivityThread.java:5494)
at java.lang.reflect.Method.invokeNative (Native Method)
at java.lang.reflect.Method.invoke (Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1099)
at dalvik.system.NativeStart.main (Native Method)
Caused by: android.content.res.Resources$NotFoundException:
at android.content.res.Resources.getValue (Resources.java:2350)
at android.content.res.Resources.loadXmlResourceParser (Resources.java:3668)
at android.content.res.Resources.getLayout (Resources.java:2166)
at android.view.LayoutInflater.inflate (LayoutInflater.java:396)
at android.view.LayoutInflater.inflate (LayoutInflater.java:354)
at com.android.internal.policy.impl.PhoneWindow.setContentView (PhoneWindow.java:366)
at android.app.Activity.setContentView (Activity.java:2009)
at com.packagename.Home.onCreate (Home.java:58)
at android.app.Activity.performCreate (Activity.java:5322)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2303)
“com.packagename.Home.onCreate (Home.java:58)”是“setContentView(R.layout.home);”
有什么错误?Resources.java 文件在哪里可以看到呢?怎么了?谁能帮我?谢谢!
解决方案
推荐阅读
- sql - 如何将 ID 列表从一个 Oracle 模式传递到另一个?
- erlang - gen_server:使用新状态调用
- php - 即使不应该调用的中间件也会被调用
- javascript - 仅删除 ArrayList 中的重复元素之一
- python - Scrapy / Python中的增量分页
- jquery - 突出显示表格每一行中的最高数字
- go - 如何使用 go mod 复制非 go 文件
- sql - 如何从另一个表中排除缺少变体的产品?
- angular-cli - Angular 通用/服务器端渲染丢失文件
- image - 使用 Docker 主机在 MacOS 上运行脚本的“OCI 运行时创建失败”问题