How to generate a . apk file in Android Studio?

Asked

Viewed 68,862 times

22

If it is already generated in which folder it is located?

  • Build > Generate Signed APK to generate the final APK.

  • thank you very much!!

  • @Lucasnunes http://meta.pt.stackoverflow.com/questions/2333/por-que-muitas-peoples-respondernos-coment%C3%A1rios-em-vez-de-criar-uma-resposta

  • @Victor I went #5, but I answered right now.

1 answer

25

It depends on which apk you refer to. Every time you compile your project in Android Studio and run it you’re generating an apk. The difference is in the build configuration.

When you only compile for testing (debug), you generate a development apk, which is usually in:

SEU_PROJETO\app\build\outputs\apk

With a name like:

app-debug.apk

This apk should only be used for testing and development. You nay deliver that version to the user.


For final release, you must make a digital signature on apk, then send it to the store. For this, go to Build > Generate Signed APK, according to the image:

Demonstração do Menu

So, you should sign the apk by filling out the information in the window that will appear:

Janela de Assinatura

This key (password and file), must be well-guarded, because you may need it to make apk updates. If you lose this key, Google will not authorize the update and has nothing to do (except register another app).

Finally, after this window Android Studio will compile the signed apk and will open already in the folder where it is. This you can send to the store.

  • I can fill in these fields with any value?

  • How do I install this apk on any android? Could not...

  • @Debeka Search about adb install PATH_DO_APK

Browser other questions tagged

You are not signed in. Login or sign up in order to post.