Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
86 views
in Technique[技术] by (71.8m points)

Apk location in New Android Studio

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...