I now want to deal with the topic of testing and in all tutorials when it comes to dependencies written so

androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' 

but in my case, this way I received any errors, then the import does not find something else. As soon as I changed everything androidTestCompile to testCompile everything works as it should ...

So I think nothing will happen if you leave it like that?

    1 answer 1

    • testCompile is the configuration for tests located in src/test ;
    • androidTestCompile is the configuration for tests located in src/androidTest .

    You can src/test modules that are not related to the Android SDK in src/test , and related src/androidTest in src/androidTest .

    The principal difference between these configurations is that the tests from src/test will be run under the JVM, and the tests from src/androidTest will run directly on the device / emulator (under Dalvik / ART).

    • It was always interesting to me, how many years you have been doing this, since 70% answer questions on Java and Android here :) And it’s immediately clear that a professional in his field is E1mir
    • does it mean if I understand correctly, then if I put androidTestCompile then I have to do all the imports in src/androidTest this directory? - Aleksey Timoshchenko
    • @KryTer_NexT, Not really a lot. Yes, and to a professional I am still very far away. - post_zeew
    • @AlekseyTimoshchenko, Yes. The dependencies specified in androidTestCompile are only available in src/androidTest . - post_zeew