When using Gradle Android plugin, you no longer need to have a separate project for testing. Production sources should be put into src/main/java directory, test sources should be in src/instrumentTest/java. The same applies to resources.
From Android Gradle plugin User Guide on project structure.
Project Structure
The basic build files above expect a default folder structure. Gradle follows the concept of convention over configuration, providing sensible default option values when possible.
The basic project starts with two components called “source sets”. The main source code and the test code. These live respectively in:
src/main/ src/instrumentTest/
Inside each of these folders exists folder for each source components. For both the Java and Android plugin, the location of the Java source code and the Java resources:
java/ resources/
For the Android plugin, extra files and folders specific to Android:
AndroidManifest.xml res/ assets/ aidl/ rs/ jni/
Note: src/instrumentTest/AndroidManifest.xml is not needed as it is created automatically.
You can change the standard project layout
sourceSets { instrumentTest { java { srcDir '../other/src/java' } resources { srcDir '../other/src/resources' } } }
src/test/javadirectory, not in another project. Do you have tests in another project?