{"action":"created","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/781","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/781/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/781/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/781/events","html_url":"https://github.com/robolectric/robolectric/issues/781","id":21470633,"number":781,"title":"Still get java.lang.RuntimeException: Stub! in Robolectric 2.2","user":{"login":"cliff76","id":270462,"avatar_url":"https://avatars.githubusercontent.com/u/270462?v=3","gravatar_id":"","url":"https://api.github.com/users/cliff76","html_url":"https://github.com/cliff76","followers_url":"https://api.github.com/users/cliff76/followers","following_url":"https://api.github.com/users/cliff76/following{/other_user}","gists_url":"https://api.github.com/users/cliff76/gists{/gist_id}","starred_url":"https://api.github.com/users/cliff76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliff76/subscriptions","organizations_url":"https://api.github.com/users/cliff76/orgs","repos_url":"https://api.github.com/users/cliff76/repos","events_url":"https://api.github.com/users/cliff76/events{/privacy}","received_events_url":"https://api.github.com/users/cliff76/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":42,"created_at":"2013-10-23T17:38:58Z","updated_at":"2015-03-25T02:12:49Z","closed_at":"2014-12-31T18:39:18Z","body":"I have a fairly complicated app that I'm trying to use with Robolectric 2.2. I've added the robolectric jar to the top of my classpath in IntelliJ but I still get:\r\n\r\nCaused by: java.lang.RuntimeException: Stub!\r\n\tat com.amazon.device.messaging.ADMMessageReceiver.<init>(Unknown Source)\r\n\tat com.my.android.push.adm.ADMPushMessageReceiver.<init>(ADMPushMessageReceiver.java:15)\r\n\t... 31 more\r\n\r\nMy classpath is:\r\nrobolectric\r\njunit-4.10\r\napp dependencies\r\n\r\nI've also tried:\r\njunit-4.10\r\nrobolectric\r\napp dependencies\r\n\r\n\r\nI use this ivv.xml to retreive my dependencies:\r\n\r\n```\r\n<ivy-module version=\"2.0\">\r\n    <info organisation=\"com.my.android\" module=\"unit-test\" />\r\n    <configurations>\r\n        <conf name=\"binaries\" description=\"binary jars\" />\r\n    </configurations>\r\n    <dependencies>\r\n        <dependency org=\"org.robolectric\" name=\"robolectric\" rev=\"2.2\" conf=\"binaries->default\" />\r\n        <dependency org=\"jmock\" name=\"jmock\" rev=\"1.2.0\" conf=\"binaries->default\" />\r\n    </dependencies>\r\n</ivy-module>\r\n```\r\nand that brings down all of these jars which I add to my class path:\r\n```\r\nant-launcher.jar\t\tcommons-codec.jar\t\tmaven-artifact-manager.jar\tnekohtml.jar\t\t\twagon-file.jar\r\nant.jar\t\t\t\tcommons-logging.jar\t\tmaven-artifact.jar\t\tobjenesis.jar\t\t\twagon-http-lightweight.jar\r\nasm-analysis.jar\t\tfest-reflect.jar\t\tmaven-error-diagnostics.jar\tplexus-container-default.jar\twagon-http-shared.jar\r\nasm-commons.jar\t\t\tfest-util.jar\t\t\tmaven-model.jar\t\t\tplexus-interpolation.jar\twagon-provider-api.jar\r\nasm-tree.jar\t\t\thttpclient.jar\t\t\tmaven-plugin-registry.jar\tplexus-utils.jar\t\txercesMinimal.jar\r\nasm-util.jar\t\t\thttpcore.jar\t\t\tmaven-profile.jar\t\trobolectric.jar\r\nasm.jar\t\t\t\tjmock.jar\t\t\tmaven-project.jar\t\tsqlite-jdbc.jar\r\nbackport-util-concurrent.jar\tjunit.jar\t\t\tmaven-repository-metadata.jar\tsupport-v4.jar\r\nclassworlds.jar\t\t\tmaven-ant-tasks.jar\t\tmaven-settings.jar\t\tvtd-xml.jar\r\n```\r\n\r\nI'm using Robolectric 2.2 with the latest EAP IntelliJ. I noted that IntelliJ EAP was using the project root as a default for the working dir and have fixed this to use the module dir. Prior to that I could run my test without getting this error but it was having trouble finding resources. Please help!"},"comment":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/comments/85786140","html_url":"https://github.com/robolectric/robolectric/issues/781#issuecomment-85786140","issue_url":"https://api.github.com/repos/robolectric/robolectric/issues/781","id":85786140,"user":{"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},"created_at":"2015-03-25T02:12:49Z","updated_at":"2015-03-25T02:12:49Z","body":"@sweetleon Oh, I see. That makes sense now."}}