1

Currrently i am using android 3.1.4 and when i try to generate signed apk using Build->Generate signed apk the apk file stores in

/app/release/app-release.apk

And i also configured the build process to automatically sign your APK using Open Module Settings. plz refer here . And according to this document the location is

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

So which apk file is correct/perfect for the play store publication?

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

Or

/app/release/app-release.apk

InsaneCat
  • 2,115
  • 5
  • 21
  • 40
cool
  • 59
  • 2
  • 9

3 Answers3

1

both the APKs have their specific concerns.

the apk generated using normal build can be found here,

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

in general, if you're in the development phase then we do not have to generate every time keystore details and all the security details. cause, we just have to test the changes after bugs resolved. so, the best usage of the application found using normal build is to test and debug your app.

while, the apk generated using generate signed apk can be found here,

/app/release/app-release.apk

signed apk requires keystore and password details. so, it is used to upload for your final build. when, you're 100% sure that the application is as per your requirement, only then you should generate a signed apk.

so, the answer for your question is, It is recommended that you upload an apk, which is generated using "Generate Signed APK".

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Jay Mungara
  • 6,663
  • 2
  • 27
  • 49
0

/app/release/app-release.apk

would be the one you're looking for. I found myself in a similar situation not so long ago

Milind Mevada
  • 3,145
  • 1
  • 14
  • 22
James Baloyi
  • 82
  • 12
0

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

Ashwini Saini
  • 1,324
  • 11
  • 20