This test passed normally initially. After a few days, you checked out a new branch (fixed by many other developers) and it no longer works.
Testing class in the mylibrary library module:
import com.company.mylibrary.BuildConfig;
@RunWith(RobolectricGradleTestRunner.class)
@Config(constants = BuildConfig.class, manifest = "src/main/AndroidManifest.xml", sdk = 21)
public class MyTest {
I also tried:
@Config(constants = BuildConfig.class, sdk = 21)
@Config(constants = BuildConfig.class, manifest = Config.NONE, sdk = 21)
In the build.gradle library module
dependencies {
.
.
testCompile 'org.robolectric:robolectric:3.0'
Error message when starting inside AS: java.lang.RuntimeException: build/intermediates/manifests/full/debug/AndroidManifest.xml not found or not a file; it should point to your project AndroidManifest.xml
Error message when starting from the command line: com.company.mylibrary.framework1.feature1.MyTest > testMethod STANDARD_ERROR
java.lang.RuntimeException: build/intermediates/manifests/full/debug/AndroidManifest.xml not found or not a file; it should point to your project AndroidManifest.xml
A) Don't know why it is looking there for the manifest
B) That file/directory does not exist
C) src/main/AndroidManifest.xml does exist
Things I tried: - deleted the build directory in that library module
- restarted Android Studio
- Build/Clean
- Build/Rebuild Project
- run the test (both inside AS and from command line)
- and tried different versions of the @Config notation
It seems like I'm at rest, which I cannot understand.
I am working on a MacBook Pro. Android Studio 2.0 beta5