Apk location in New Android Studio

To help people who might search for answer to this same question, it is important to know what type of projects you are using in Studio.

Gradle

The default project type when creating new project, and the recommended one in general is Gradle.

For a new project called "Foo", the structure under the main folder will be

Foo/
    settings.gradle
    Foo/
        build.gradle
        build/

Where the internal "Foo" folder is the main module (this structure allows you to create more modules later on in the same structure without changes).

In this setup, the location of the generated APK will be under

Foo/Foo/build/apk/...

Note that each module can generate its own output, so the true output is more

Foo/*/build/apk/...

EDIT On the newest version of the Android Studio location path for generated output is

Foo/*/build/outputs/apk/...

IntelliJ

If you are a user of IntelliJ before switching to Studio, and are importing your IntelliJ project directly, then nothing changed. The location of the output will be the same under:

out/production/...

Note: this is will become deprecated sometimes around 1.0

Eclipse

If you are importing Android Eclipse project directly, do not do this! As soon as you have dependencies in your project (jars or Library Projects), this will not work and your project will not be properly setup. If you have no dependencies, then the apk would be under the same location as you'd find it in Eclipse:

bin/...

However I cannot stress enough the importance of not doing this.


In my case, I'm using Android Studio 1.0.2, I get my APK file from:

<myAndroidProject>/app/build/outputs/apk/app-debug.apk

There is really no reason to dig through paths; the IDE hands it to you (at least with version 1.5.1).

In the Build menu, select Build APK:

Android Studio Build Menu

A dialog will appear:

Android Studio APK Generated Dialog

If you are using a newer version of Android Studio, it might look like this:

prompt to locate your APK file

Clicking the Show in Explorer or locate link, you will be presented with a file explorer positioned somewhere near wherever Android Studio put the APK file:

File explorer after clicking the link in the APK Generated dialog

But in AS 3, when you click locate, it puts you at the app level. You need to go into the release folder to get your APK file.

folder structure in AS 3

folder contents after a build


I am on Android Studio 0.6 and the apk was generated in

MyApp/myapp/build/outputs/apk/myapp-debug.apk

It included all libraries so I could share it.


Update on Android Studio 0.8.3 Beta. The apk is now in

MyApp/myapp/build/apk/myapp-debug.apk

Update on Android Studio 0.8.6 - 2.0. The apk is now in

MyApp/myapp/build/outputs/apk/myapp-debug.apk