AndroidStudioAndRobolectric icon indicating copy to clipboard operation
AndroidStudioAndRobolectric copied to clipboard

Resources not found exception when applicationId is altered

Open apolatynski opened this issue 10 years ago • 1 comments

Running Robolectric tests fail with a android.content.res.Resources$NotFoundException when in build.gradle the applicationId is changed.

The exception happens when applicationId is set in defaultConfig or a build flavor to a value different than the one in the AndroidManifest. Same thing happens when applicationIdSuffix is used.

apolatynski avatar May 14 '15 05:05 apolatynski

Just changing the applicationId should not give any erros but use different applicationIds is a known issue. Try the posted workaround https://github.com/robolectric/robolectric/issues/1623#issuecomment-101538263

nenick avatar May 14 '15 10:05 nenick