Closed krpot closed 9 years ago
Don't mix robolectric with instrumentation tests ;) Robolectric is designed to run on jvm instead of device or emulator. Did you read http://tools.android.com/tech-docs/unit-testing-support ?
nenick, it works now. Thanks.
I came from stackoverflow.com question.(http://stackoverflow.com/questions/29714750/android-studio-1-1-0-cannot-setup-robolectric). Thanks for your answer but I have cloned your project and tested your code, but Android Studio cannot recognise @Config and @RobolectricTestRunner annotations when I added @Config(emulateSdk = 18) @RunWith(value = RobolectricTestRunner.class) in the ApplicationTest class. Please let me know how I fix the issue.