Why is "Generate Signed APK" disabled in Android Studio? - android

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.

Related

Missing Option for Android Bundle In Android Studio

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:

Android Studio not generating signed APK, despite saying that it successfully did

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.

Android Build and Installation error: INSTALL_PARSE_FAILED_NOT_APK

Have these erro when i'm trying to build the apk to some devices. Have no idea whats going on.
I get that when i build and install apk on device at the first time.
Someone have some tips for that?
[[EDIT]]
Well, after creating a debug key on keystore, i can build and deploy the apk via ADP to the device. But, dont know why, the error just return...
And now, we have other error:
UPDATE:
I Fix that issue removing all Android SDK and Android Studio and ReInstall it.
The problem can be solved by addding the install flags -r -t in the Run/Debug Configuration Dialog like it's showed in the given image
You can find Run/Debug Configuration Dialog location here according to Jetbrains.
UPDATE: Depending on the Android Studio version the Run/Debug Configuration position in the IDE can be slightly different, but always refer Jetbrains to find whatever you are looking for
When you've installed an APK from another source, Android Studio warns you before overwriting.
For example, if I've developed an application, uploaded it onto the Google Play Store, downloaded it, then try to re-deploy that same application from Android Studio, I'll get this warning.
It's trying to tell you that the way the package is signed is different; it's warning you that another app might be masquerading as the original.
The reason is you are trying to install the application with the same package name.
If you have already downloaded the same application from the play store /app market, then simply uninstall that application and RE-RUN.
This error can also occur if you recently switched branch which had different build variants declared in build.gradle file and you didn't perform gradle sync.
For example you had release and debug and then you switched to branch which has releas, deubg and staging variants; your project will still build but while installing apk this error can pop up.

Android Studio 1.3 not generating signed APK, but does for a different (blank) project

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.

App crashes at .apk

The app I created is running great on emulator or on my device when i connect the cable, but when I create an .apk file (I am sending it to myself )and I try to run it on my device in crashes.
In the past it worked in other apps I created but on that case it wont.
I am using the .android/debug.keystore with its default key(android). I've tried to create a new keystore aswell but the app still crashes when I run the apk.
Does anyone have any experience with this kind of error - has any clue how to fix it?
Edit:
the bugSense tells me:
java.lang.NoClassDefFoundError: xx.xxx.xxxxx.xxxxx.CommonUtilities
at xx.xxxx.xxxxx.xxxxx.xxxxxx.onTabChanged(Tabs.java:617)
at xx.xxxx.xxxxx.xxxxx.xxxxxx.initialiseTabHost(Tabs.java:544)
at xx.xxx.xxxxx.xxxxx.xxxxxx.onCreate(Tabs.java:90)
there're two options to your NoClassDefFoundError
ProGuard is shrinking the file and removing/stripping out/re-compressing libraries that your app needs to work.
Your build path is not properly configured and a library you use is not being packed into the .apk
edit:
where's CommonUtilities being defined? External library?
The problem is that I was doing the export of the apk from right click->export!
You must do that kind of export on the final product when it is ready for release.
The right way to export when your app is still on development is right click on the project->Android Tools->Export Signed Application Package.
Many thanks to all for your help learned new things on android from that question.

Categories

Resources