0

Lately, I encounter a lot of problems using Android Studio.
I'm using Android Studio 1.5.1, with gradle plugin 1.5.0 (corresponding to Gradle 2.2.1, I think), on Windows 7.

There is no update for Android Studio for now, and neither in standalone SDK manager.

Sometimes when I try to launch my app on an emulator, the builing process wont stop (I waited for 1 hour once...). Even after I quit the emulator and just build project on sync gradle, it launch a process that never ends. The log file is not writing and there is no error message anywhere.

For the process to end, I have to go to the taskmanager and stop every java.exe process I see, and it then shows this message :

Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.8/userguide/gradle_daemon.html Please read the following process output to find out more:
-----------------------

After that, not any build will succeed, and the only way for my project to successfuly build is to reboot my OS ! (even after taskkilling every known related task, like android64.exe, adb.exe, java.exe)

Is the bug known ? Is there any workaround ? Am I doing something wrong ?

Further details

When it bugs, the gradle console is writing

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources]`. 

, but then nothing. It's more that gradle is not working than it's stroking on one point. But there still is that java.exe process with its 66Mb of memory...

It bugs after approximately 8 successful runs.

Last updates

I know now the real troublemaker ! It is C:\Users\Me\.gradle\daemon\2.8\registry.bin

I can't even right click on it without crashing Windows Explorer !

1 Answer 1

2

I have been facing the same problem. However, I had a previous project which had been successfully built. What I did was - changed the location of Service Directory Path(the one pointing to the '.gradle' folder) of my new app to the Service Directory Path of the successfully built app, i.e from
C:/Users/YOUR USERNAME/AndroidStudioProjects/CURRENT APP/.gradle
to
C:/Users/YOUR USERNAME/AndroidStudioProjects/SUCCESSFULLY BUILT APP/.gradle

To change the service directory path-
go to settings --> Build, Execution, Deployment --> Build Tools --> Gradle --> service directory path

1
  • That worked, but I had to put on an external folder, outside of my user folder. Thanks ! Dec 16, 2015 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.