How to generate build without executing test cases using android studio Electric Eel?

783 Views Asked by At

I updated my mac Android studio to version "Electric Eel"

When I just try to generate the APK using "Build APK" option, then it automatically starts running the test cases, which is unnecessarily causing me further issues and slowing down the process.

enter image description here

"I want to know if there is any option available, where I can disable running the test cases while just building the APK.?"

PS:

  1. I have explored it at many places but not getting exact option to configure it.
  2. I am only able to generate the APK using command ./gradlew assemblePreProdDebug (PreProd is flavour), it works without the test cases being executed.
  3. When I select the device and run the build, it works fine, it runs without the test cases being executed.
1

There are 1 best solutions below

1
On

You can use gradle panel to launch the task you want.

In order to make your build task appear you will have to:

  • go to the Prefrences > Experimental
  • In gradle section uncheck "Only include test tasks in the Gradle task list generated during Gradle Sync" (pay attention that may have an impact on gradle sync task execution time depending on the complexity of your project).
  • Apply change then click on gradle sync button

Then you should be able to see the assemble tasks in the gradle side panel.