I am creating an application in which there are 2 Android projects; The first project is the library project, and the second project is my main project. Project-1 works fine, but when I add it to my Project-2 as a library, it gives me exceptions like this. The resource was not found. Line Resource Identifier # 0x76000456
when I checked my rowset and R.java this line is.
I tried to execute a clean project by rebooting my eclipse and my system.
The file my strings.xml looks like this: -
<string name="pref_loadrecent_id">loadrecent</string> <string name="pref_loadrecent_defvalue">false</string> <string name="pref_confirmclose_id">confirmclose</string> <string name="pref_confirmclose_defvalue">false</string>
and I call like this: -
BooleanPreferenceDefinition LOAD_RECENT = new BooleanPreferenceDefinition(pref_loadrecent_id, pref_loadrecent_defvalue); BooleanPreferenceDefinition CONFIRM_CLOSE = new BooleanPreferenceDefinition(pref_confirmclose_id, pref_confirmclose_defvalue);
and I am doing a static import R.string like this
import static com.ankit.R.string.*;
For testing, instead of calling the hard code values pref_loadrecent_id and pref_loadrecent_defvalue from the string identifier, it shows a similar exception (with a different identifier) ββfor pref_confirmclose_id and pref_confirmclose_defvalue .
Please help me.
source share