Not sure what version of Android Studio this was added in, but I'm using Android Studio 3.4.
In the Project Explorer Window, select the Project View.
Right click on your root project and select "Create 'All Tests'..."
...this window will appear (these defaults need to be changed)
Change the following options:
Search for tests:
JRE:
Click Apply