{"action":"created","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/1747","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/1747/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/1747/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/1747/events","html_url":"https://github.com/robolectric/robolectric/issues/1747","id":71917133,"number":1747,"title":"NotFoundException: not such label","user":{"login":"cmonfortep","id":4747865,"avatar_url":"https://avatars.githubusercontent.com/u/4747865?v=3","gravatar_id":"","url":"https://api.github.com/users/cmonfortep","html_url":"https://github.com/cmonfortep","followers_url":"https://api.github.com/users/cmonfortep/followers","following_url":"https://api.github.com/users/cmonfortep/following{/other_user}","gists_url":"https://api.github.com/users/cmonfortep/gists{/gist_id}","starred_url":"https://api.github.com/users/cmonfortep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmonfortep/subscriptions","organizations_url":"https://api.github.com/users/cmonfortep/orgs","repos_url":"https://api.github.com/users/cmonfortep/repos","events_url":"https://api.github.com/users/cmonfortep/events{/privacy}","received_events_url":"https://api.github.com/users/cmonfortep/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/robolectric/robolectric/labels/3.0","name":"3.0","color":"c7def8"},{"url":"https://api.github.com/repos/robolectric/robolectric/labels/defect","name":"defect","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/robolectric/robolectric/milestones/5","html_url":"https://github.com/robolectric/robolectric/milestones/3.0","labels_url":"https://api.github.com/repos/robolectric/robolectric/milestones/5/labels","id":870515,"number":5,"title":"3.0","description":null,"creator":{"login":"erd","id":184194,"avatar_url":"https://avatars.githubusercontent.com/u/184194?v=3","gravatar_id":"","url":"https://api.github.com/users/erd","html_url":"https://github.com/erd","followers_url":"https://api.github.com/users/erd/followers","following_url":"https://api.github.com/users/erd/following{/other_user}","gists_url":"https://api.github.com/users/erd/gists{/gist_id}","starred_url":"https://api.github.com/users/erd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erd/subscriptions","organizations_url":"https://api.github.com/users/erd/orgs","repos_url":"https://api.github.com/users/erd/repos","events_url":"https://api.github.com/users/erd/events{/privacy}","received_events_url":"https://api.github.com/users/erd/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":62,"state":"open","created_at":"2014-11-18T01:23:28Z","updated_at":"2015-05-20T15:54:45Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-04-29T16:06:51Z","updated_at":"2015-05-20T16:11:20Z","closed_at":null,"body":"I'm trying to execute some tests with org.robolectric:robolectric:3.0-SNAPSHOT and I'm having this error:\r\n```\r\nandroid.content.res.Resources$NotFoundException: no such label com.my.packageINT.debug:string/app_name\r\n\tat org.robolectric.util.ActivityController.getActivityTitle(ActivityController.java:104)\r\n\tat org.robolectric.util.ActivityController.attach(ActivityController.java:49)\r\n\tat org.robolectric.util.ActivityController$1.run(ActivityController.java:121)\r\n\tat org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:309)\r\n\tat org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:45)\r\n(....)\r\n```\r\n\r\nMy project is build with Android Studio, com.android.tools.build:gradle:1.1.3 and has flavors and buildtypes.\r\n\r\nLooking for an answer I found different possible solutions without solving the problem.\r\n\r\nI've tried some custom RobolectricRunners:\r\nhttps://github.com/nenick/AndroidStudioAndRobolectric/blob/master/app/src/test/java/com/example/myapplication/CustomRobolectricRunner.java\r\nand this:\r\nhttps://github.com/nenick/AndroidStudioAndRobolectric/blob/flavors/app%2Fsrc%2Ftest%2Fjava%2Fcom%2Fexample%2Fmyapplication%2FCustomRobolectricRunner.java\r\nand this:\r\nhttp://stackoverflow.com/questions/22102176/resourcesnotfoundexception-when-using-robolectric-with-gradle\r\n\r\n\r\nAlways with the same error as result :("},"comment":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/comments/103943123","html_url":"https://github.com/robolectric/robolectric/issues/1747#issuecomment-103943123","issue_url":"https://api.github.com/repos/robolectric/robolectric/issues/1747","id":103943123,"user":{"login":"jaredsburrows","id":1739848,"avatar_url":"https://avatars.githubusercontent.com/u/1739848?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredsburrows","html_url":"https://github.com/jaredsburrows","followers_url":"https://api.github.com/users/jaredsburrows/followers","following_url":"https://api.github.com/users/jaredsburrows/following{/other_user}","gists_url":"https://api.github.com/users/jaredsburrows/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredsburrows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredsburrows/subscriptions","organizations_url":"https://api.github.com/users/jaredsburrows/orgs","repos_url":"https://api.github.com/users/jaredsburrows/repos","events_url":"https://api.github.com/users/jaredsburrows/events{/privacy}","received_events_url":"https://api.github.com/users/jaredsburrows/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T16:11:20Z","updated_at":"2015-05-20T16:11:20Z","body":"I am tagging this issue, https://github.com/robolectric/robolectric/issues/1623, here as well.\r\n\r\nRead the issue and here is @Egorand 's answer that works for me:\r\n\r\nCreate your own `CustomBuildConfig.java`:\r\n\r\n        public static final class CustomBuildConfig {\r\n                public static final boolean DEBUG = BuildConfig.DEBUG;\r\n                public static final String APPLICATION_ID = \"com.correct.package.name\";\r\n                public static final String BUILD_TYPE = BuildConfig.BUILD_TYPE;\r\n                public static final String FLAVOR = BuildConfig.FLAVOR;\r\n                public static final int VERSION_CODE = BuildConfig.VERSION_CODE;\r\n                public static final String VERSION_NAME = BuildConfig.VERSION_NAME;\r\n        }\r\n\r\nAnd pass to your `CustomBuildConfig` to `@Config`:\r\n\r\n       @Config(constants = CustomBuildConfig.class)"}}