0

What is the difference between these two import statements? (in build.gradle):

testCompile 'junit:junit:4.12'

androidTestCompile 'junit:junit:4.12'
Farbod Salamat-Zadeh
  • 19,687
  • 20
  • 75
  • 125
LostPuppy
  • 2,471
  • 4
  • 23
  • 34
  • Possible duplicate of [Confused about testCompile and androidTestCompile in Android Gradle](http://stackoverflow.com/questions/29021331/confused-about-testcompile-and-androidtestcompile-in-android-gradle) – Andrii Abramov Oct 24 '16 at 11:31

1 Answers1

1

There's a great answer here explaining the difference:

Simply testCompile is the configuration for unit tests (located in src/test) and androidTestCompile is used for the test API (located in src/androidTest).

...

The main distinction between the two is the test sourceset runs in a regular Java JVM, whereas the androidTest sourceset tests run on an Android device (or an emulator).

Community
  • 1
  • 1
Farbod Salamat-Zadeh
  • 19,687
  • 20
  • 75
  • 125