android studio build error debug-unaligned.apk path not found - android

Last night I updated my android studio to 0.5.3 and since than i am getting this error message whenever I am trying to generate a signed-apk. It does not occur when I am just running the project over android studio.
I tried rebuilding, cleaning project, restarting android-studio, reimporting the project, no success. I am pretty desperate right now
EDIT: i found out that actually debug-unaligned is not generated... But why is that? And why do i need to generate it if i am just trying to sign the app

In 0.5.3, we tried to speed up the build process by not having it do a full build to an APK except when it needs to, but we missed some cases where it needs to.
You can follow progress in https://code.google.com/p/android/issues/detail?id=67948 but in the meantime you can work around it by running the assembleRelease task, either from the command line or from the Gradle tasks view:

Related

Do not build Android project automatically on opening

I have been using Android studio for a long time, yet never understood what are the processes that Android studio runs at when we load a new project via File>New or File>Open. We just load the project and have to wait for so many minutes before the android studio completes those processes (I know that we can still click on file names and editor would open them, but i have observed the android studio will still lag until all those processes are completed)
However I don't know how, recently My Android studio started behaving differently. I don't know what i did, But every time i created a new project, or loaded a previous one, it would show a message like this:
This was very good for me, because even when i don't click the try again
button, I am still able to access all files and without any lag, thereby removing a need for external file editor. I feel this was some bug in gradle or cache handling that got fixed when i uninstalled AS and updated to AS 3.5 .
So is there a way to manually run all those build and indexing processes, instead of Android Studio just running them automatically?
UPDATE:
I think i was not clear before. I want that error to occur . Meaning I want to have a control over when the building process starts. Also, I am NOT having any error as of now, all my projects are working fine.
Look for highlighted warnings in you Gradle file, you may need to update some things and then sync again.
You could also try to clean and rebuild your project.
You can also File->Invalidate Caches / Restart if none of the above work.
If none of the above work, please provide more details on what warnings/errors you get.
When version conflict in gradle file, it cant be able to build and sync the project.There may be show "Unsupported Modules Detected: Compilation is not supported for following modules”. Fix them too

android studio is taking too long time to build

I'm new to android and android studio is taking too long to build
and I'mscreenshoot not sure why
I have noticed that sometimes Android Studio builds either get stuck or slow down for seemingly no reason. First thing to try would be to quit Android Studio, then run ./gradlew --stop from the command line to make sure any Gradle deamons have been shut down completely. You may also want to do a ./gradlew clean to get rid of any intermediate files that might be troubling the build.
If that doesn't help, you may need to look into optimizing your build. There are lots of resources on the web, but you might want to start with the Android team's list of ideas.

Android Studio Build Gradle Runnig too long without end

I have a project which was working very well on android studio , suddenly it turns not able to build anyway .. It keeps telling Build Gradle Runnig without any result for 30 min !
I tried to clear .gradle file of project without result.
I tried to uninstall android studio and clean all its files from user directory AndroidStudio 2.1 and .gradle files and also no result.
This problem occures only with this project and others working fine on android studio ..
What should I do to make my project build again ?!
I had that once when I updated the gradle wrapper. It really took 45 minutes to download that 16MB or so. I had to that time some network issues with their repo servers.
Try to run in the console gradlew aR and see what happens. If you see there hundreds of dots you need to wait if there happens nothing kill all java processes and try again.

Can not Clean Project on Android Studio

When tried to clean the project using options provided by Android Studio IDE. I get following errors.
Errors occurred during the build. Errors running builder 'Android
Package Builder' on project 'appcompat_v7'. Problems encountered while
deleting resources. Could not delete 'C:\Users\Felix Manford
Esq\Documents\Workspace\Ghtourwall\appcompat_v7\bin\appcompat_v7.jar'.
Problems encountered while deleting files. Could not delete:
C:\Users\Felix Manford
Esq\Documents\Workspace\Ghtourwall\appcompat_v7\bin\appcompat_v7.jar.
Problems encountered while deleting resources. Could not delete
'C:\Users\Felix Manford
Esq\Documents\Workspace\Ghtourwall\appcompat_v7\bin\appcompat_v7.jar'.
Problems encountered while deleting files. Could not delete:
C:\Users\Felix Manford
Esq\Documents\Workspace\Ghtourwall\appcompat_v7\bin\appcompat_v7.jar.
I observed it was right after i set up my image button; which i don't get because i did everything correctly.
I observed it was right after i set up my image button; which i don't
get cos i did everything correctly
No This is not due to this issue. The error is not a syntax issue, It is a development environment's Build issue.
There are several things that you can do to kill the process that prevents the cleaning of the application to work.
Close the IDE and then start it again. This will kill the currently running Gradle build tasks. which will prevent these jar files being deleted during the clean up.
You can invalidate the IDE using the following option,
Even if that is not working, You can kill all the JVM processes that runs on your computer using the task manager,
If that does not solve the issue, You can try restarting the computer as last resort.
I do not expect that you get to this one. But If any of these things did not work, then there is something wrong with your IDE or JVM, Try to reinstall IDE and see,

Android Studio stuck while building application

I recently switched from Eclipse to Android Studio because I read that it is now the official IDE for Android application development. I downloaded and installed the latest version (1.0.2) for Windows. When using the program for the first time, I decided to create a test application to see if the program was working correctly. Unfortunately, it was not. Once I clicked the finish button to complete the New Project Wizard, A loading bar showed up that said Gradle: Build. This is where the program gets stuck. There is no error message and it appears that the program is running fine, however the build never actually completes. I am never given my MainActivity.Java class, or my activitymain.xml document. If I click the cancel button, the program freezes and I have to use the TaskManager to kill the program. If I re-enter the program and choose to open an existing project, my project will be there. However, upon trying to open the project, I am greeted with the same Gradle: Build loading bar.. I have been searching for an answer for the last 3 days and nothing has worked. Any help is greatly appreciated!
Things I have tried:
Simply letting the program sit for a while to see if it was actually downloading something and was just really slow. I let it sit for 45+ minutes before killing the program.
Uninstalling and re-installing Android Studio
Restarting my computer
Turning off my firewall (Kaspersky)
Running the program as an administrator
Connecting to a different network
Disconnecting my computer from any networks (to force the program to build in offline mode)
Manually downloading Gradle from the link that Android Studio attempts to use when it gets stuck and telling the program to use that file instead of downloading another one.
(I went to this link https://services.gradle.org/distributions/gradle-2.2.1-all.zip, downloaded the file, unzipped it, went to Gradle settings in Android Studio, checked the Offline work checkbox, and finally set the service directory path to my unzipped Gradle folder.)
Hopefully I have given enough information and made it clear what my problem is. If not please tell me what else I need to explain so I can get this issue resolved. Thanks!
Please note I am working on a 64 bit machine running Windows 8. Also, I use studio64.exe
to run the program.
From the discussion we had in the comments, it does not look like you have your gradle on your windows path.
Please change the below to point to your gradle install:
set GRADLE_HOME=C:\<installation location>\gradle-1.11
set PATH=%PATH%;%GRADLE_HOME%\bin
After this, verify that in the terminal running the following works:
gradle tasks
once you get this working, you will want to run the following in your project:
gradle wrapper
This will produce a .bat file which you can then use to run gradle through the wrapper, letting you support multiple native gradle installations.

Categories

Resources