Apk Location in New Android Studio

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.

Signed release version apk file location in New Android Studio 3.1.4

tl;dr = Both are correct

let me Explain how

There is three types of APK

An unsigned APK

A signed Apk = Unsigned APK + Signing certificate key

A debug Apk = Unsigned APK + Debug certificate key

The automatic build process generate the same APK as you manually generate, if you configured it to automatically sign your APK.

so

If we don't want to sign our APK again and again then we can configure to get signed apk every time we build and the generated APK will go into

/build/app/outputs/apk/app-release.apk

and if we use Generate Signed APK

then the default path. (path can be changed)

/app/release/app-release.apk

Even you can generate an unsigned APK and later sign it and release. its also the same

here is the official documentation where it showing how you can sign an unsigned apk

and the last line of this documentation clearly saying

An APK signed with your private key is ready for distribution

Generally developer's find Generate Signed APK manually is better because maybe you made a change and forgot to build/run your code and picked older app-release.apk so generating manually means you are 100% sure that this one is latest

but if you just build and pick auto created release file then it's also correct and latest one



Related Topics



Leave a reply



Submit