jjzjj

NotFoundException

全部标签

以编程方式设置 android.R.attr.listChoiceIndicatorMultiple 时的 android.content.res.Resources$NotFoundException

我正在尝试以编程方式为ListView中的CheckedTextView项目设置“android:checkMark”属性。运行我的应用程序时出现以下异常:android.content.res.Resources$NotFoundException:ResourceID#0x101021aID#0x101021a的资源对应于android.R.attr.listChoiceIndicatorMultiple,这正是我传递给我的CheckedTextView的值:mCheckedTextView.setCheckMarkDrawable(android.R.attr.listChoic

android - 错误 android.content.res.Resources$NotFoundException : File from xml type layout resource ID #0x102000a

嘿,我正在尝试为一个看起来像(并且大部分行为像)通话记录的列表设计,如下所示:为此,我下载了源代码,并且正在研究它以了解实现它的类和xml文件。我找到了这两个xml文件recent_calls_list_item.xml:另一个是recent_calls_list_item_layout.xml:我的Activity是这样的:publicclassRatedCallsextendsListActivity{privatestaticfinalStringLOG_TAG="RecentCallsList";privateTableLayouttable;privateCallDataHe

android.content.res.Resources$NotFoundException : String resource ID

应用程序抛出异常android.content.res.Resources$NotFoundException:StringresourceID我的情况并不常见(因为给定的ID确实存在)。我问这个问题是为了自己回答。请看下面我的回答为什么会发生这种情况以及为什么会发生在我身上。 最佳答案 您可能已经发现,当您尝试将某个整数设置为字符串时会发生此错误,例如:代码中的某处some_variable被声明为int并且您想显示它的值,因此您尝试将其设置为some_textview使用setText()方法:intsome_variable=

android - 将 Robolectric 与 Gradle 结合使用时的 Resources$NotFoundException

我一直在关注thistutorial关于设置Robolectric以测试我的AndroidGradle项目。我一直遇到这个错误:android.content.res.Resources$NotFoundException:nosuchlabelcom.mypackage.dev:string/app_name通过从教程下载示例项目,我确定问题出在我的productFlavors(开发、暂存、生产)。将风格添加到工作示例项目会导致同样的问题。你可以看到我的大纲build.gradleinthisanswer.我看到了各种答案(例如here),这表明我需要为每种风格指定sourceSet

Java MongoDB 类 NotFoundException : org. springframework.data.convert.CollectionFactory

我正在尝试获取集合中的所有文档并将它们添加到List作为java对象,但是当我运行findAll,我得到以下异常:java.lang.ClassNotFoundException:org.springframework.data.convert.CollectionFactoryatjava.net.URLClassLoader.findClass(URLClassLoader.java:381)~[na:1.8.0_65]atjava.lang.ClassLoader.loadClass(ClassLoader.java:424)~[na:1.8.0_65]atsun.misc.La

android - 获取 android.content.res.Resources$NotFoundException : exception even when the resource is present in android

请让我知道我哪里出错了。我正在创建一个应用程序,其中一项Activity仅处于横向模式。所以我在AndroidManifest.xml文件中添加了以下内容我已经创建了一个类似的文件夹/res/layout-land并在其中添加一个名为see_today_landscape_layout的布局。并在onCreate()我添加了以下内容protectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.see_today_landscape_la

android - 获取 android.content.res.Resources$NotFoundException : exception even when the resource is present in android

请让我知道我哪里出错了。我正在创建一个应用程序,其中一项Activity仅处于横向模式。所以我在AndroidManifest.xml文件中添加了以下内容我已经创建了一个类似的文件夹/res/layout-land并在其中添加一个名为see_today_landscape_layout的布局。并在onCreate()我添加了以下内容protectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.see_today_landscape_la

android - 三星上的资源$NotFoundException

我的一个应用在三星S5(准确地说是SMG900V)上崩溃了,但有以下异常(exception):android.content.res.Resources$NotFoundException:Fileres/drawable-xxhdpi-v4/common_signin_btn_icon_disabled_focus_light.9.pngfromdrawableresourceID#0x7f0200e5atandroid.content.res.Resources$CRunnable_openmp.doOpenMP(Resources.java:1097)atandroid.con

android - 切换到 Android 应用程序包分发后,应用程序有时会因 Resources$NotFoundException 而崩溃

应用每月有超过20000名活跃用户。它已经在googleplay上发布了几个月。在我最近从使用.apk的分发切换到使用.aab的分发后,我开始在crashlytics和googleplaystore上收到随机崩溃。在引入崩溃的构建中没有进行其他重大更改。崩溃发生在应用程序的第一个屏幕上,同时扩展了xml布局。有问题的xml布局是一个简单的初始屏幕,仅包含一个ImageView和一个TextView。imageview是android.widget.ImageView,不是兼容版本,它显示png图像,而不是矢量图像。该图像存在于所有可绘制文件夹变体中:drawable、drawable-

android - 资源 NotFoundException?

我收到来自android市场的崩溃报告:android.content.res.Resources$NotFoundException:ResourceID#0x....我每周会收到大约17个。它指向我的代码中的以下内容:context.getResources().getDrawable(R.drawable.foo);该资源肯定存在于我的/drawable文件夹中。我有几十万次安装,我不确定这对某些用户来说是如何失败的,但对绝大多数用户来说都是有效的。我想知道发生了什么,因为他们无法在这种状态下使用该应用程序。有什么想法吗?谢谢---------更新----------我还可以在我