Fixed
Status Update
Comments
an...@google.com <an...@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
ma...@spotify.com <ma...@spotify.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.
la...@google.com <la...@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.
an...@google.com <an...@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
}
Description
We suspect that this is because Android Studio traverses all dependencies of our main module without cacheing any result and with us having 200+ modules, it will take a long time.
Attaching debugger to Android Studio shows that some modules down in hierarchy are visited more than 10 thousands times with in a couple of seconds.
We see this issue in Android Studio beta 2 as well as older releases.