I have my tests in MainProject/Project/src/test. I am using Jake Wharton's gradle-android-test-plugin. Whenever I specify a dependency with testCompile, it doesn't auto-complete in the IDE. But it does compile.
my build.gradle looks like this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
}
}
apply plugin: 'android'
apply plugin: 'android-test'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.11'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
}
but whenever I try to code it does this:
It is annoying and descreases my productivity. Any suggestions on how to resolve this? Thanks.
I've had the same problem. My temporary solution is to repeat the testCompile dependencies in instrumentTestCompile.
This way, the Android Studio recognises the instrumentTestCompile dependencies and starts auto-completing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With