Fixed
Status Update
Comments
uc...@google.com <uc...@google.com> #2
Reproduced in
Android Studio 3.2 Canary 5
Build #AI-173.4630681, built on March 2, 2018
JRE: 1.8.0_152-release-1136-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.9.0-6-amd64
Android Studio 3.2 Canary 5
Build #AI-173.4630681, built on March 2, 2018
JRE: 1.8.0_152-release-1136-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.9.0-6-amd64
ja...@google.com <ja...@google.com> #3
Renaud, can you please take a look as Michal will be out of the office next week? Looks like an issue that happens only when tests are run from IDE.
rp...@google.com <rp...@google.com> #4
The issue seems to be related to the fact that "implementation" directive in the "com.android.test" plugin is not exposed properly in the IDE, i.e. the IDE does not see the "junit 4.12" library in the corresponding test project.
rp...@google.com <rp...@google.com> #5
Here is the relevant build.gradle file from the project included in #1:
apply plugin: 'com.android.test' // <= HERE
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 15
}
targetProjectPath ':app'
}
dependencies {
implementation 'com.android.support.test:runner:1.0.1'
implementation 'junit:junit:4.12' // <= HERE
}
apply plugin: 'com.android.test' // <= HERE
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 15
}
targetProjectPath ':app'
}
dependencies {
implementation 'com.android.support.test:runner:1.0.1'
implementation 'junit:junit:4.12' // <= HERE
}
al...@google.com <al...@google.com>
ls...@google.com <ls...@google.com> #6
Fix pending review.
Description
When including the same dependency (say, junit) in both :app:testImplementation and :tests:implementation configurations then Android Studio fails to find JUnit classes in the test project even though the project builds and runs fine from the command line.
See the attached project for an example.
Reproduced with the following versions:
Android Studio: 3.0.1, 3.2 Canary 5
Android Gradle Plugin: 3.0.1, 3.2.0-alpha05
Gradle: 4.1, 4.6