0

I'm pretty much newbie to android and I've built a .apk file of my app based on some researches. There is two files:

  • app-debug.apk
  • app-debug-unaligned.apk

My question is kinda duplicate of this and this. But honestly still I don't get the idea. All I want to know, should I install which one on my mobile? Or should I buy which one as an application? Also what's the difference of them? You know, this is not very clear:

It is a two step process. The unaligned apk is just an intermediate product.

Can please someone makes me clear about them? Also why the name of them contains debug word? Aren't they final output?

Community
  • 1
  • 1
stack
  • 10,280
  • 19
  • 65
  • 117
  • Possible duplicate of [Difference between app-debug.apk and app-debug-unaligned.apk](http://stackoverflow.com/questions/30366905/difference-between-app-debug-apk-and-app-debug-unaligned-apk) – Charuක Jan 07 '17 at 17:40

2 Answers2

1

Can please someone makes me clear about them? Also why the name of them contains debug word? Aren't they final output?

No, the debug version contains extra code that allows Android studio to attach itself your app's running process on the phone for debugging purposes e.g. setting breakpoints, inspecting variables. Making this public can potentially allow others to reverse-engineer your app.

If you want to put an apk on the Google Play Store, you'll need to build the signed Release version. This is done from Android studio: Build -> Generate Signed APK... and selecting Release as your build type after accessing your keystore.

As for unaligned, as per the questions linked, it's an intermediate file and should be ignored. The answers in the posts you've linked explain it better than I could.

Michael Dodd
  • 10,102
  • 12
  • 51
  • 64
  • I see, thank you .. uvpote, just one question, by accessing `app-debug.apk`, can people see my app's codes? – stack Jan 07 '17 at 17:34
  • 1
    No, not directly. But it's generally a bad idea to allow users to poke around where they shouldn't be :) Plus the release APK will be smaller. – Michael Dodd Jan 07 '17 at 17:43
0

you will find your output apk in C:\Users\username\Desktop\new\projectname\app\build\outputs\apk

this will be your final apk and ignore all other apk.

Aman Verma
  • 3,155
  • 7
  • 30
  • 60