【问题标题】:android.content.res.Resources$NotFoundException: Resource ID #0x7f0a003b type #0x5 is not validandroid.content.res.Resources$NotFoundException:资源 ID #0x7f0a003b 类型 #0x5 无效
【发布时间】:2017-11-13 09:31:06
【问题描述】:

我正在尝试使用适用于 Android 的 Linphone 库。我已按照指定安装了所有库,当我尝试运行项目时,出现以下错误。

  Process: org.linphone, PID: 13440
   java.lang.RuntimeException: Unable to start activity ComponentInfo{org.linphone/org.linphone.LinphoneLauncherActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f0a003b type #0x5 is not valid
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
       at android.app.ActivityThread.access$800(ActivityThread.java:151)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5254)
       at java.lang.reflect.Method.invoke(Native Method)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f0a003b type #0x5 is not valid
       at android.content.res.Resources.getBoolean(Resources.java:999)
       at org.linphone.LinphoneLauncherActivity.onCreate(LinphoneLauncherActivity.java:50)
       at android.app.Activity.performCreate(Activity.java:5990)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
       at android.app.ActivityThread.access$800(ActivityThread.java:151) 
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
       at android.os.Handler.dispatchMessage(Handler.java:102) 
       at android.os.Looper.loop(Looper.java:135) 
       at android.app.ActivityThread.main(ActivityThread.java:5254) 
       at java.lang.reflect.Method.invoke(Native Method) 
       at java.lang.reflect.Method.invoke(Method.java:372) 
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 

请让我知道如何解决这个问题,因为我的工作因此而陷入困境。 提前谢谢!!。

【问题讨论】:

  • 你还需要贴出相关代码

标签: android linphone


【解决方案1】:

关于这个答案:
Android Resources$NotFoundException: Resource ID #0x7f030027

您可以检查 R 文件中的 Resources$NotFoundException: Resource ID #0x7f030027。它会告诉你哪个资源造成了问题。作为替代解决方案,我认为您可能有 setText 或任何内容只是一个 int。正如您所知道的,编译器将寻找相应的资源值。因此,只需将一个空字符串连接为 ""

【讨论】:

  • 我没有在edittext中设置任何整数值。我正在使用 Linphone 库进行视频通话。我已经完成了完整的设置,现在当我尝试运行它时,它给了我错误。
猜你喜欢
  • 2022-09-29
  • 1970-01-01
  • 2020-02-02
  • 2018-06-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多