2

Last friday I created some builds from my app from within Android Studio by simply clicking Build > Build APK. That created 4 files:

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

I then uploaded app-release.apk to the play store, which worked perfectly well (is is public now).

Today I wanted to do the same, but today I only get the files

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

As you can see in the screenshot below the release APKs are from last friday ("maart" == "March" and "Vandaag" == "Today"), and I have never done any signed APK stuff:

enter image description here

On this SO-topic (from 2013, so pretty old) I read that you need to run Generate Signed Apk, create new key store paths, and more trouble. In the meantime I did remove the .idea/ folder (because that solved "APK path is not specified for module" error), but I wouldn't know why that would change anything.

So my main question is: how can it be that I could create an app-release.apk last friday, but today not anymore? And most importantly; how can I build the app-release.apkagain?

All tips are welcome!

Community
  • 1
  • 1
kramer65
  • 50,427
  • 120
  • 308
  • 488
  • 2
    `Build APK` does not build release APK's (Signed apk's) to get a signed APK you need to use `Generate Signed APK` – tyczj Mar 07 '16 at 15:21
  • @tyczj - So why did it work last friday then? – kramer65 Mar 07 '16 at 15:23
  • Could it have been an old apk that you built earlier? tyczj is right. Also debug and release apks are put in different folders – Tim Mar 07 '16 at 15:24
  • Isn't that just a setting under the "Build Variants" tab in AS? If I change from "debug" to "relase" I get an "app-release.apk" in the same folder. – Harald K Mar 07 '16 at 15:28
  • @haraldK - Now that is what I like to hear! But where can I find this "Build Variants" tab? I can't find it in the Preferences. Could you give me a tip on where I can find it? – kramer65 Mar 07 '16 at 15:30
  • 1
    Usually it's docked somewhere around the edges of AS. Try double-hitting shift ("Search Everywhere") and type "build variants" (this is good for finding any action or tool or preferences in IDEA/Android Studio). – Harald K Mar 07 '16 at 15:33

1 Answers1

1

Just to add some print screens of where are the features discussed in the comments. This following screens consider the Android Studio (IntelliJ IDEA) 2.0 Beta 6. It might serve as reference for other people not finding it.

The first one is Build > Generate Signed APK ... and the Build Variants dock opened.

Build signed APK and opened build variants dock

Second one shows where the build variants dock is hidden.

Dock variants closed

Eduardo
  • 4,282
  • 2
  • 49
  • 63