Android studio 3.0 does not generate signed apk
Asked Answered
B

9

46

After updating android studio to version 3.0 (windows), I am unable to generate a signed APK.

enter image description here

When build has completed, i get the message:

enter image description here

Clicking "Locate" brings me to the APP folder, but there is no APK to be found.

What has been changed ?

Bernal answered 26/10, 2017 at 8:49 Comment(7)
Whats ur device, Windows, mac, linux? I just updated it is working fineDevisal
Make sure your folder item VISIBLE or notCalque
@NirajSanghani "C:\apps\app" does this path seems like Linux?Audi
Are you able to access this folder and also do you have write permission?Rejoice
Did you try using gradlew from console to generate release build e.g. gradlew.bat assembleRelease from your project root folderRejoice
just trying to help, chill out, sorry to miss thatDevisal
I get the same issue in LinuxVerne
D
68

Since Android Studio 3.0 update, the apk generated will be in

{project-folder}/app/release/app-release.apk

Also 1 more file is generated Output.json which holds the apk generation details.

Sample:

[  
   {  
      "outputType":{  
         "type":"APK"
      },
      "apkInfo":{  
         "type":"MAIN",
         "splits":[  

         ],
         "versionCode":1
      },
      "path":"app-debug.apk",
      "properties":{  
         "packageId":"njscommunity.xxxxx",
         "split":"",
         "minSdkVersion":"19"
      }
   }
]

All depends on Gradle build, so at the end it all depends on Gradle version you build with. i.e. Gradle Android plugin for Android Studio.

Devisal answered 26/10, 2017 at 9:1 Comment(16)
This only holds true if you run a release build via run, but if you manually generate release build then it gets generated where the location is pickedRejoice
did u check atleast, i just did that manually, yet it went to that folderDevisal
yeas so whereever u build there will be /release/app-release.apkDevisal
also try using other than C drive, It does give Access issues in some constraintsDevisal
did u find ur solution?Devisal
Yes, but the OP is manually generating Signed APK via Build > Generate Signed APK menuRejoice
I did it the same way, will just do that.Devisal
It would seem that a restart of android studio was required, and signed apks are now placed in /app/release/... ThanksBernal
This isn't working for me. I am having the same issue as OP, but there is no /app/release folder. There is only /app which is where it normally generates to, but there is no "release" folder. Simply nothing seems to be generating.Arguable
mine was actually in {project_folder}/{module_name}/production/releaseCabbageworm
gradle build, so at the end it all depends on gradle version u build with. i.e. gradle android plugin for android studioDevisal
Android Studio used to create an app-release.apk file in the folder you selected. Now, it generates a folder called release, then puts it in there. Confusingly, when you click 'locate' in the finished box it still brings you to the folder you selected, not to the release folder it generated... Took me half an hour to figure it out...Overtone
Downvote, because it didn't solve OP's (and my) problem. @Sahil Kapoor's helped me. In my eyes it is inconsistent that clicking on "locate" in balloon message leads to the directory that is chosen and not the directory where apk is. Where can I file a bug?Socio
Issue with Android studio when trying to tap locate it takes you to the old location and not the correct one mentioned in the answer +1.Erased
Android Studio 3 created app/release/release/app.aab So there is no app-release.apk ? There is no hidden files in there.Can anyone help?Ellis
Ok. Turned out app.aab new sort of .apk of Android Studio 3Ellis
N
29

Android Studio 3.0 Now creates a "release" folder inside the specified destination folder and places the release apk inside that.

{APK Destination Folder}\release\app-release.apk

OR as mentioned by @velis

{APK Destination Folder} \ {flavor} \ {variant} \ {apkname}.apk

For Example:- In your case: C:\apps\app\release\app-release.apk

Narghile answered 4/11, 2017 at 20:49 Comment(2)
This is really close, but 'variant' is actually a combination of 'flavor' and 'build type'. So if you have two flavors dev and production, and two build type debug and release then you have four possibles and the folders will be {APK Destination Folder}\{Flavor}\{BuildType}\{apkname}.apkPescara
It took me hours to figure out that it was located inside the {flavor} folder.Debidebilitate
P
12

In my case I found apk file in folder {specified_destination}/{flavor_name}/release folder

Pehlevi answered 31/10, 2017 at 15:46 Comment(0)
F
8

I had the exact issue after upgrading to Android studio 3.0 (windows)

After spending HOURS looking for the solution, I find out that, that simple action solved it for me:

changing the destination path apk to different path. (for me to C:) just solved it

Generate Signed APK dialog

Foltz answered 27/10, 2017 at 15:55 Comment(0)
U
2

I have faced the same problem. After a few hours downgrading

classpath 'com.android.tools.build:gradle:3.0.0'  

to

classpath 'com.android.tools.build:gradle:2.3.3'

solved the issue in the build.gradle file.

Upwards answered 28/10, 2017 at 20:32 Comment(5)
Gradle 3.0.0 is a very important release with many changes. Downgrading is not a solution.Presentment
I am aware. But if you need an urgent release to the market, I prefer to sign properly my APK. Yo can always work with gradle 3.0.0 and change it only to produce release.Upwards
In fact, I prefer to sign an APK, that after I updated to gradle 3.0.0 I cannot. For me it is valid, so if 3.0.0 is not working for all the people, are you trying to say that the solurion is updating to 3.0.0 and not signing any APK?? Thanks for your negative feedback, btwUpwards
Upvoted this because it worked for me in the short term. But I can understand that this is a not very satisfying workaround.Abstraction
Of course! Thanks. Now the right answer is the one proposed by Sahil Kopoor, but when I answered it didn't workUpwards
G
2

Sahil Kapoor was almost on mark:

The generated file's path is your specified destination folder + {flavor}/{variant}/

{destination} / {flavor} / {variant} / {apkname}.apk

Golf answered 5/11, 2017 at 7:24 Comment(0)
V
0

Another thing is that Android Studio 3.0 will make it an .aab file which is an app bundle file. This enables you to have the code signing in google play, so you don't have to have the key locally. There is an answer here on how to do that. How to enable Google Play App Signing Seems to be a step in the right direction, even if it is not very clear when actually doing it.

Valtin answered 4/5, 2019 at 4:21 Comment(0)
L
0

In my case all is correct but android studio is not generated the APK and i'm not getting an error message.

Previously i was update my package name com.test.package > com.final.name.package using refactor all works fine even create an not signed APK.

Finally i can see that my applicationId inside the gradle has the old package name, when change it for the new package name the signed APK is generated without problems.

Lyndseylyndsie answered 19/1, 2021 at 23:37 Comment(0)
L
0

Okay for me this thing works :

  1. Check the folder in which the apk is going to generated. Normally it will be the Android Studio Project > app > release
  2. If this folder is having "app-release.apk" then remove the same and try to regenerate the signed apk.
Lorrianelorrie answered 14/5, 2023 at 9:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.