Gradle build running taking forever

Asked

Viewed 4,999 times

0

Android Studio is no longer running the project. I have uninstalled and installed again but does not solve, it is only in this of "Gradle build running" and never ends.

22:21:33 Gradle sync started
22:23:58 Gradle sync completed
22:24:00 Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]

I also went to "File > Settings Build,Execution,Deployment> Build Tools>" Gradle and enabled the option "Offline work" and also gave nothing.

What I do?

  • hello @Leo, I had this problem here, I solved it by creating a new project with the same name and copying the relevant files and folders from the old to the new, by pertinent say, the files from the folder "src/main/seudominio/seuprojeto/*. java" and the "res" folder. warns if it worked

  • Is there a problem for my users to update? my app is in the Play store.

  • Voce needs to do everything the same, the project name, the domain name, the package name, finally, make a reset as if you were doing it for the first time, and also remember to put the correct version and copy your Signed key, another important thing, better if you copy from your file manager and paste by own studio by clicking on the places where Voce wants to paste

  • Unfortunately, the way I managed to solve this was like this, because I tried everything, I tried to reset the cache, I tried the sdk, I deleted the folder ". studio" and not even with a new installation of android studio worked, so I did it and solved.

  • Another thing, I don’t remember the domain name of my App, you know where I find in some file? I only remember the package

  • 1

    the domain name is something like: com.seudominio.seupackage, open the folder "app/main/seudominio/seupacote" there is the full name that you need to use, usually the package name in the manifest is the domain name and the compound package name

  • Okay, I’ll try here and you warning! Thank you!

  • Manage to solve here and I will post an answer!

Show 3 more comments

1 answer

1


Be able to solve this problem, in Windows 10. Eternity shows an error in logs in Gradle console. So, go on My Computer > Estates > Show advanced settings > Environment variable.

Click the button New and put the details below:

Nome da Variável: SLAVE_AAPT_TIMEOUT
Valor: 50

Remember that Java is being blocked by the firewall, Windows or third party. In my case, I use the anti-virus Kaspersky Lab, then deactivated and when I went to recompile, the Windows firewall warned that Java wanted permission to access internet.

The solution is to allow, so I allowed in both firewall and Gradle successfully compiled in about 7 minutes!

  • Here is my comments for those who use other OS’s, for now serves as a shortcut for us who abolished windows, because I use linux for a long time and if someone here has a solution similar to the friend @Leo ae, but for the other operating systems, would be very welcome

  • I was going to do it the way you explained, as I saw it was a lot of work, I saw a shortcut from Gradle console And you got the error messages, that’s how you were able to fix it. Try to see the error message and ask a question, which someone using Linux should help you! Thank you so much for your comments!

  • 1

    In fact @Léo, I got tired of camelar with this and went after the solution for linux, what solved me this, was to install the libraries for 32 bits on my machine that is 64 bits, hence, the case is to install these libs: sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686, here I use SCL 7 (RHEL), for a debian-based distro, you have to do: sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386. then worked round.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.