Advertisement
Advertisement


Apk location in New Android Studio


Question

I started using new Android Studio and cant find the APK of the application in IDE,where it actually locates?

2013/05/21
1
162
5/21/2013 4:16:23 AM

Accepted Answer

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.

2014/06/24
123
6/24/2014 8:38:39 AM


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

2017/11/30

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
2015/12/10

If anyone would be missing his APK and couldn't find it in the locations stated in other answers (I found this question, since I couldn't find it either) it might just be in this folder (mine was)

<project folder>/target/classes/<appname>.apk 

I also had a there this file:

<appname>.unaligned.apk

I am not perfectly sure, whether the apk is actually the full-blown apk, which should be generated, but I tried it on various devices (not only the target device, but also those which were supporting only the minimum SDK) and it worked.

Hope this will help someone.

2013/08/18

It is Project_Location/app/build/outputs/apk for Gradle Project

2015/07/16

So the apk in Android studio is generated inside build folder of app module.

Correct path to apk would be \app\build\outputs\apk. I am using Android Studio Version 1.4.1. So apk could either be found at app/build/apk/ or \app\build\outputs\apk base on the version of Android studio you are using. Refer the below image

Android studio project structure

Also find more reference on these links.

  1. Building and Running from Studio
  2. Studio Project Overview
2015/11/26