This may seem like a duplicate question, as there are 4 or 5 other exact questions. But I have tried the solutions to every other question like this with no luck.
Basically, I've been successfully generating signed APKs for weeks now, but out of the blue 3 days ago the signed APK is not being generated. Simply nothing gets generated, even though Android Studio says that it has successfully generated it.
I am using Android Studio 3.0.
I have tried totally uninstalling/reinstalling AS, I've made sure that both APK option checkboxes are checked during the signed APK generation dialog window.
I have many times restarted Android Studio and my computer, as well as cleaning/rebuilding many times. I do not know what to do from here.
I really need to get an update of my app out to Google Play but I cannot generate the new APK.
The apk is probably being generated but not on the path you expect. Look around the project subdirectories or search for apk using your operating system search tools.
I too faced the same issue, what you need to do is after migrating a project to Android studio 3.0, delete the already generated signed apk in path /project/app and generate the signed apk again, you will see a release folder in the same directory.
Related
My Android Studio does not give me the option to “Generate Signed Bundles”, it only allows me to “Generate Signed APK.” Additionally, the “Build Bundles/APKs” (or similar) is not existent. Even when I go through with Signed APK, no signed apk is outputted, nothing seems to happen.
I’m working with a developer for an android apk, so once I receive APK, I load it into Android Studio via “Profile or Debug APK.” I’m not sure if this is the problem.
When I go to the build variant tab, there is no module or variant present there, not sure why. When I go to project structure, it says the libraries folder is completely excluded, again, not sure why.
I have tried everything I can think of and have researched a ton to no avail.
Developer doesn’t use android studio either so they aren’t too sure on troubleshooting steps within this application.
Attached are some screenshots.
Image of Build Tab:
Image of Build Output Console:
I'm using the Firebase App distribution to send out updates to a few testers and the most recent APK I uploaded will not install on Android devices (actually it is several new versions that all have issues installing). I had previously uploaded a version that worked, but all subsequent updates fail with an 'App not installed' error message. I'm confused by the APK files that are generated from Android Studio and I don't recall which version I previously uploaded that worked. In the apk folder there is a debug folder that contains an apk file named app-debug.apk. I'm pretty sure this is the one I used with the successful version of the distribution. There is also a flutter-apk folder with an identically named file app-debug.apk. Does anyone know the difference between these files and which one I should use? That question is a side note as neither of those files work.
I have tried telling my testers to uninstall the previous (working) version and then try to update their Android with the latest version, but the error still occurs. I do not have any issues with my iOS version and that test group.
Do I need to update the debug.keystore file? I have searched many different threads for a solution and nothing seems to work. Any suggestions to debug the issue would be appreciated.
On Android, if the package exported by debug cannot be installed on some devices, such as "parsing failure", you can add a signature file to the debug version. It is better to generate it yourself, and do not use the tool's own. In addition, you can add a signature file to the debug version androidmanifast.xml Statement under application android:testOnly= "False", which may help you
I'm having trouble uploading my .apk to Google Play Store. I've previously been able to upload multiple different builds up to last week, but today I get the error that I should zipalign my file first.
EDIT: Normally, I was able to generate signed and zipaligned .apk's that the AppStore accepted by just using Android Studios built-in "Generate Signed APK" wizard. This did not work today, and led to the following:
I've tried the following:
Manual zipalign of the app-release.apk generated by Android studio. When I try this, I get the error "VERIFICATION FAILED" at the end. Some googling says that providing full path to a location where you have write-access is important, so I've tried doing it with the specific path, but to no avail:
./zipalign -v -f 4 /Users/<username>/git/<projectname>/app/app-release.apk /Users/<username>/git/<projectname>/app/aligned.apk
I then tried to download the APK Signer 1.8.5 and use that to zipalign the .apk - and behold, success! It creates an aligned apk, and i'm able to verify it using both Android Studio's own zipalign tool by
./zipalign -c -v 4 app-release_ALIGNED.apk
and the APK Signer itself. However, when uploading I now get the error:
Failed to run aapt dump badging:
W/ResourceType(208730): Bad resource table: header size 0x80a3 or total size 0x80b50000 is larger than data size 0x7bcc4
ERROR: dump failed because the resource table is invalid/corrupt.
This, I haven't been able to find solutions for.
I then tried to recreate the circumstances I was previously able to upload APKs from by reverting to a previous commit/build, as well as reverting from AS 2.2 preview 3 to AS2.2 preview 2, but again - no luck.
Finally, I tried explicitly adding
zipAlignEnabled true
to my release config in Gradle, but that didn't help either.
I'm out of suggestions, and hoping someone can help? :-) Thanks
Finally, eureka!
I randomly stumbled upon this line in my root build.gradle:
classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
Android Studio 2.2 preview 3 requires this gradle build tool upgrade, and I had just pressed "sure, go ahead" as always. I got curious, and tried to change it back to what had worked last,
classpath 'com.android.tools.build:gradle:2.2.0-alpha2'
and built the project in Android Studio preview 2 instead - and voila, it worked! It seems there is a bug with the alpha3 build.
I hope this helps someone. I know I'm a happy friday-camper, that's for sure! :-)
Note to self: Don't rely on canary-builds for production apps in the future, no matter how much my friends and collegues push.
Here are the things that I faced a few days ago: Try them one at a time:
After downloading Android Studio 2.2 Preview 2 - which was released during the IO conference, I ran my code successfully until when time came to release a newer version of the apk to the playstore. That was when hell broke loose!
I searched all over but I got nothing. So, someone suggested the following approach: After generating your signed apk, unzip it and delete META-INF folder then re-package it and manually sign it through the terminal. Packaging a file into .apk format is simple: just use a zip extension then rename the extension.
Although that seemed like it could have worked for me, it didn't. It worked for others though.
Finally, I realized that it was caused by a bug in the latest Android Studio Preview 2.
Thankfully, I still had my stable 2.1 version which I opened, loaded my project and Boom! It worked like I expected it to.
So, please try the last option, clean up your project first then try again. I know how frustrating this can be. Good luck!
I searched throughly but I am admittedly a newbie when it comes to this IDE. I have spent hours at this stage and I'm unsure if it's a stability bug or something with the build settings.
I made an App, throughout the process I was able to generate the signed APK but due to naming violations on the play store I was forced to rename it, in the process of changing the project name something has broken the ability to generate a signed APK on this specific app.
PROCESS- I select the release options (in contrast to debug) and press build, the event log states- "Executing tasks: [:app:assembleRelease]" but does not generate a signed APK (I've looked in my selected destination and also in the /app/build/output folder).
When I open a relatively blank project and generate signed APK, it makes the apk. I've been through all the settings that I can find, to no avail. I've restarted and reinstalled AS.
The same thing happened to me. I had to open build/outputs/lint-results-release-fatal.html and correct the errors shown there. Then the APK was generated successfully.
It is likely a bug on Android Studio parsing lint output.
I know there are a bunch of questions about errors that occur when Generate Signed APK is invoked in Android Studio. However, I can't even get there!
I'm working with Unity and cough cough this is my first time trying to make an Android build. At first I thought maybe Unity would export an Eclipse build but it seems to be more up to date than that.
Anyway, I downloaded Android Studio, and loaded the project, but the button is disabled. I read somewhere about someone having to install gradle manually, but when I looked in the plugins folder of the app, gradle is there.
I thought it might be something to do with not having connected a key store but, apparently you're supposed to do that after you select Generate Signed APK.
Any ideas? Thank you, I'm tearing my hair out.