I've created a new TestProject and added following line to my testMethod:
Robolectric.getShadowApplication().getString(R.string.mystring);
My test failed with
android.content.res.Resources$NotFoundException: unknown resource 2131558482
The console displays the following warnings:
WARNING: No manifest file found at .\..\..\MyProject\AndroidManifest.xml.Falling back to the Android OS resources only.
To remove this warning, annotate your test class with @Config(manifest=Config.NONE).
WARNING: no system properties value for ro.build.date.utc
Is AndroidManifest.xml necessary to get string resources? I tried to add Manifest by org.robolectric.Config.properties and @Config but the warning still occurs and I can't get string resource. I made sure the relative path to manifest is correct. I also tried changing the JUnit run configuration but this did not help.