You need to run the assemble task before you can export any apk file.
From the right hand side, open the gradle task
To export debug apk file:
- Open Build Variants form the left bottom corner. Select Build variant as "debug".
- Open Gradle tasks from right hand side. Run assembleDebug
- Generate the apk file using Build > Generate signed apk file. Note that though the option says "signed" apk it will generate a debug apk as the build variant selected is debug
To export release apk file:
- Open Build Variants form the left bottom corner. Select Build variant as "release".
- Open Gradle tasks from right hand side. Run assembleRelease
- Generate the apk file using Build > Generate signed apk file. Note that signed apk will not generate a signed apk if you have build variant selected as debug. Make sure that the build variant is selected as release