Gradle build running taking forever

0

Android Studio is no longer copiling the project. I have already uninstalled and installed again but it does not resolve, it is only in that 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've also been to "File > Settings Build, Execution, Deployment & Build Build Tools >" Gradle and enabled the option "Offline work" and also did not give anything.

What do I do?

    
asked by anonymous 05.11.2016 / 02:42

1 answer

1

You can solve this problem in Windows 10. Eternity shows an error in the logs in Gradle console . Then go to My Computer > Properties > Show advanced settings > Environment Variable .

Click the New button and enter the details below:

Nome da Variável: SLAVE_AAPT_TIMEOUT
Valor: 50
  

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

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

    
06.11.2016 / 13:38