官方示例:https://github.com/googlesamples/android-testing

官方文档请 google

 

要求:

  • Android SDK v23
  • Android Build Tools v23
  • Android Support Repository rev17

开始:

These samples use the Gradle build system. To build a project, enter the project directory and use the ./gradlew assemble command or use "Import Project" in Android Studio.

  • Use ./gradlew connectedAndroidTest to run the tests on a connected emulator or device.(Window:gradlew.bat connectedAndroidTest
  • Use ./gradlew test to run the unit test on your local host.


There is a top-level build.gradle file if you want to build and test all samples from the root directory. This is mostly helpful to build on a CI (Continuous Integration) server.

相关文章:

  • 2021-05-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-06-09
  • 2021-05-30
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案