[英]No resource identifier found for
When I try to refactor an app, I get hundreds of " No resource identifier found for (...)
" Errors "in package com.app" 当我尝试重构应用程序时,我收到数百个“未No resource identifier found for (...)
”错误“包com.app中的错误”
How can I solve this Problem? 我怎么解决这个问题?
I already tried to replace the values to the new package Name but the error remains the same. 我已经尝试将值替换为新的包名称,但是错误仍然相同。
The Errors happen at such code parts: 错误发生在以下代码部分:
<com.example.app
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:latin="http://schemas.android.com/apk/res/com.fa.ime"
android:id="@+id/LatinkeyboardBaseView"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/keyboard_bottom_padding"
android:background="@drawable/keyboard_dark_background"
android:textStyle="bold"
latin:keyBackground="@drawable/btn_keyboard_key_gingerbread"
latin:keyTextStyle="bold"
/>
R class, used to access resources in android, linked to use package name from Android.manifest. R类,用于访问android中的资源,链接为使用Android.manifest中的包名称。 Replace in all imports of R class old package name for new package name. 在所有导入的R类旧软件包名称中替换新的软件包名称。 Unfortunately you only can use standard text search in this case. 不幸的是,在这种情况下,您只能使用标准文本搜索。
As far as i know, only this class uses package name from manifest, so other imports should be fine. 据我所知,只有此类使用清单中的包名称,因此其他导入应该没问题。
I don't use Android support package, but if you using it, in every layout associated with activity, there can be parameter named tools:context
which include reference to activity. 我不使用Android支持包,但是如果您使用它,则在与活动相关联的每个布局中,都可以有一个名为tools:context
参数,其中包含对活动的引用。 If you changed package name of app, this also could be a source of your problems. 如果您更改了应用的程序包名称,这也可能是问题的根源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.