Export unsigned apk from a Gradle Project in Android Studio

Marian Klühspies picture Marian Klühspies · Mar 8, 2014 · Viewed 71.9k times · Source

I usually create projects with Eclipse and import them into Android Studio, because I hate the project structure AS gives me. In it´s module settings, I have the possibility to create artifacts which allow me to output the built apk to a certain path.

enter image description here

Now I have created a Gradle project directly with AS and it seems that those projects have quite less options than eclipse projects. I don´t find anything to output my apk and I don´t find any apk inside my project folder after building.

enter image description here

How do I get my unsigned apk out of the build process??

Answer

pyus13 picture pyus13 · Mar 8, 2014

Use

Build > Make Project

to build an apk file from Android Studio.

You can get your unsigned apk under the below path

$YOUR_PROJECT/$YOUR_MODULE/build/apk

unsigned apk files will have "unsigned" text in their names.

[ UPDATE ] :

In Recent release of Android Studio you will not get apk file on sysncing or Make Project. There are two other methods in order to get the apk file

  1. Run the app
  2. Execute assemble Task from Gradle panel present in right hand side of Studio window or from embedded terminal window on bottom(in project Root)

gradlew assembleDebug(or whatever build varient you want a build for)

and the update new apk path will be

$YOUR_PROJECT/$YOUR_MODULE/build/outputs/apk

This has been done by Android Tools team to improve the Android Studio performance.