I am running Android Instrumentation tests and when I use the
android.content.res.Resources$NotFoundException: String resource ID #0x7f060020
I figured this out for myself. The module under test was set up to be an application project but it should have been set up as a library project. In the module's
build.gradle file I changed this:
apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
I also had to remove the
applicationId line from the
build.gradle file because it is not applicable for library projects.
Once I made these changes the string's resource id could be found.