7

Every time I try to run my Desktop project in Android Studio, I instantly get the following error:

Error:com.android.tools.idea.gradle.util.Projects.lastGradleSyncFailed(Lcom/intellij/openapi/project/Project;)Z

No gradle build happens, or any sort of syncing. Android Studio just jumps straight to this error.

I have restart/invalidated caches, I have deleted my .gradle folder in both project and home locations, I have reinstalled android studio, I have created a new project, but I still get the same error.

When I run the gradle build manually, the build completes successfully. I can even run the Android project with no problems. It is just the Desktop project that is giving me problems.

Any suggestions would be much appreciated.

I am using the latest version of android gradle (2.3.0), and my JDK is the correct version (1.8).

I am getting this error after updating to Android Studio 2.3.

To clarify, the Gradle build/sync completes SUCCESSFULLY.

5
  • sounds like your desktop project might be mislinked or entering project at the wrong level
    – M Y
    Mar 4, 2017 at 22:04
  • syncing of gradle is failed so there is a gradle error ?? what is it ?
    – AAryan
    Mar 4, 2017 at 22:10
  • @AbhishekAryan Syncing of gradle does not fail. That is the problem. I do not know why I am getting this error, since nothing is wrong. Mar 4, 2017 at 22:12
  • have you tried Build-> rebuild project
    – Sparcsky
    Mar 5, 2017 at 11:55
  • 2
    disable the RoboVM plugin.
    – burgyna
    Jun 19, 2017 at 12:30

1 Answer 1

7

UPDATE: It looks like this issue may have been fixed in RoboVM 2.3.2: https://github.com/MobiVM/robovm/issues/115#issuecomment-303979058


It sounds like you may need to revert back to Android Studio 2.2, which you can download here: http://tools.android.com/download/studio/builds/android-studio-2-2-3

I had the same problem. The error message in "Messages" isn't helpful, but if you go to Help->Show Log in Finder, you'll see some extra information that's a little more useful:

2017-03-06 17:52:27,615 [4546022]   INFO - ij.compiler.impl.CompileDriver - java.lang.NoSuchMethodError: com.android.tools.idea.gradle.util.Projects.lastGradleSyncFailed(Lcom/intellij/openapi/project/Project;)Z
    at org.robovm.idea.components.RoboVmBuildProcessParametersProvider.getVMArguments(RoboVmBuildProcessParametersProvider.java:60)
    at com.intellij.compiler.server.BuildManager.launchBuildProcess(BuildManager.java:1136)
    at com.intellij.compiler.server.BuildManager.lambda$null$11(BuildManager.java:730)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.intellij.util.concurrency.BoundedTaskExecutor.runFirstTaskThenPollAndRunRest(BoundedTaskExecutor.java:178)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$000(BoundedTaskExecutor.java:40)
    at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:197)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

It turns out RoboVm isn't compatible with Android Studio 2.3 (yet): https://github.com/MobiDevelop/robovm/issues/115

After I went back to Android Studio 2.2.3, I could run the Desktop application just fine.

5
  • Is true, that's also happening using Multi-OS Engine Mar 15, 2017 at 22:14
  • Please, where can I find older versions of Android studio? That link does not work anymore.
    – Green_qaue
    Apr 28, 2017 at 11:41
  • I honestly don't know :/ Seems like they accidentally deleted/moved them. I've since moved on to Unity. It has a lot of active support behind it, so very unlikely to run into issues like this.
    – richkzad
    May 11, 2017 at 16:46
  • Does this still happen? I mean, isn't RoboVM compatible yet with Android Studio 2.3 (I use 2.3.3)? I'm trying to find the Android Studio 2.2 (any of it's versions) but can't make it to find a link that is working.
    – xarlymg89
    Jul 20, 2017 at 15:24
  • I haven't tried yet, but according to the GitHub Issue referenced above, they pushed a fix on May 25: github.com/MobiVM/robovm/issues/115#issuecomment-303979058 Which might be available in RoboVM 2.3.2 (at time of this comment, only available as a snapshot build)
    – richkzad
    Jul 21, 2017 at 16:02

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.