Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Release version of *.apk in Android Studio

I want to submite an application to Google Market. I found there is only one apk file generated in a project, its path is Project1Project/Project1/build/apk/Project1-debug-unaligned.apk

It looks like it's a debug version. Where do I find (if any) a release version of an application or how do I generate it?

like image 853
Alan Coromano Avatar asked Jul 14 '13 08:07

Alan Coromano


3 Answers

Since Android Studio is based on IntelliJ, that's how to do it in IntelliJ:

Build -> Generate Signed APK

and provide it with your key and its password.

like image 170
Mohsen Afshin Avatar answered Nov 10 '22 18:11

Mohsen Afshin


You can build an unsigned release version. See the answer here. I don't see an easy way to do it from the GUI, but you can use the shell command:

./gradlew assembleRelease

Make sure to cd to your project's directory before running the command. This will produce the file

Project1Project/Project1/build/apk/Project1-release-unaligned.apk

If you run ./gradlew assemble, both the release and debug version will be built.

More documentation here.

like image 16
zim Avatar answered Nov 10 '22 18:11

zim


From Android Studio 1.3.1, the ready-to-publish apk location is :

app -> app-release.apk

This should be published to Google Play

Intermediate apks are at :

app -> build -> outputs -> apk -> app-release-unaligned.apk

This is Intermediate result of Signing process, should not be published to Google Play

like image 3
Kushal Avatar answered Nov 10 '22 18:11

Kushal