packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:196: package R does not exist
addPreferencesFromResource(R.xml.myfile);
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:344: package R does not exist
menu.add(0, MENU_SAVE, 0, R.string.menu_save)
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:346: package R does not exist
menu.add(0, MENU_CANCEL, 0, R.string.menu_cancel)
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:454: package R does not exist
errorMsg = mRes.getString(R.string.error_empty);
^
packages/apps/Myfolder/src/com/android/myfolder/MyFile.java:458: package R does not exist
errorMsg = mRes.getString(R.string.error_empty);
In my case, this error occurred because I had changed the package name of the app (before publishing to Google Play, of course), but I forgot to update the package
attribute of the manifest
element in my AndroidManifest.xml
file. Once the package
attribute agreed with the new package name, the error went away.