When I try to refactor an app, I get hundreds of " No resource identifier found for (...)
" Errors "in package 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. Replace in all imports of R class old package name for new package name. 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. If you changed package name of app, this also could be a source of your problems.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.