I built an app and I want to generate an unsigned .apk for that.
Build > Build APK
Build > outputs > apk
Quick answer .. You should select release buildVariant then use build apk to get unsigned-apk .. otherwise by default you are using debug buildType which using debug keystore for signing apk ..
Unsigned apk cannot be installed on any device/emulator unless it is signed
So using build apk on:
Debug buildType will sign apk with debug keystore
Release builtType will produce unsigned.apk ..
Both are available on [project dir]/app/build/outputs/apk/
FYI: Why Android studio doesn't sign release builType implicitly as debug?
Thats done on purpose to prevent developers to use debug keystore by mistake to sign apk as release buildType which may go to play store ..
You have two solutions to sign release:
to have signed apk with your own keystore
I hope that may help,'.