首页 > 解决方案 > 没有 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 文件在哪里可以看到呢?怎么了?谁能帮我?谢谢!

标签: javaandroidresources

解决方案


推荐阅读