[英]android.content.res.Resources$NotFoundException · String resource ID #
I get this error:我收到此错误:
android.content.res.Resources$NotFoundException · String resource ID #0x2040003
android.content.res.Resources$NotFoundException · 字符串资源 ID #0x2040003
and in the full stack I saw that it depends on:在完整的堆栈中,我看到它取决于:
Resources.java:322android.content.res.Resources.getText
I know probably the error is that I call somewhere a setText
not passing a string.我知道错误可能是我在某处调用了
setText
而不传递字符串。
My problem is that I do not know where the problem occurs.我的问题是我不知道问题出在哪里。
Technically the line of the error is this:从技术上讲,错误行是这样的:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_web, container, false); // <-- HERE IS THE ERROR
}
The layout file is:布局文件是:
<WebView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".view.WebFragment" />
I do not know howto find the line code where the error occurs.我不知道如何找到发生错误的行代码。
It might be related to this issue: https://issuetracker.google.com/issues/141132133 regarding Webview.它可能与此问题有关: https ://issuetracker.google.com/issues/141132133 关于 Webview。
It happened to me as well, in my case it's MarkdownView which extends Webview.它也发生在我身上,就我而言,它是扩展 Webview 的 MarkdownView。 Apparently upgrading android appcompat library solve the issue, but still, I'm hoping for another solution for current library version.
显然升级 android appcompat 库解决了这个问题,但我仍然希望为当前库版本提供另一个解决方案。
Because I use the element which caused crash in 2 different place (with same implementation) and it only crash in 1 of them.因为我在 2 个不同的地方使用了导致崩溃的元素(具有相同的实现)并且它只在其中一个崩溃。 I've been spending my time searching about this and still dunno why and how to fix it.
我一直在花时间搜索这个问题,但仍然不知道为什么以及如何解决它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.