0

I am new to android development. My problem is that When i perform Build --> clean project, the following error shown in my android studio:

Gradle tasks [clean]
Error:Failed to complete Gradle execution. Cause: unknown.

The error is shown in messages section and there is no error log except as shown above.

Also project is building on another computer system successfully but not on my system.

Can anybody give some hint on this, please ?

  • I tried deleting .gradle and gradle folders but nothing works – user7435279 Jan 18 '17 at 11:52
  • I tried setting different Gradle Vm Option from all the answers found on stackoverflow, but nothing seems to be working out I'm on Android Studio 2.2 Beta 3 I'm getting this error when I try to run the app on either on the emulator or the device. – user7435279 Jan 18 '17 at 11:52
  • 1
    Possible duplicate of [Android Studio: failed to complete gradle execution, cause is empty](http://stackoverflow.com/questions/27407855/android-studio-failed-to-complete-gradle-execution-cause-is-empty) – B001ᛦ Jan 18 '17 at 11:52
  • @bub. thanks for responce but i have already tried this. but no solution works. – user7435279 Jan 18 '17 at 12:04
  • try to delete the build folder – gilgil28 Jan 18 '17 at 12:07
  • @gilgil28 i tried but still same issue – user7435279 Jan 19 '17 at 04:25

1 Answers1

1

I had the same problem in Android Studio 2.2.3 & I tried all solutions given on StackOverflow. Here is what I did:

1) Uninstalled & deleted everything (with settings).

2) Fresh Install.

3) Run Android Studio with Administrator rights.

4) Added below line in gradle.properties
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

try step 3 first, if it does not solve your problem - 1,2,3,4.

This solved my problem. Hope this helps you.

Trushant04
  • 81
  • 2
  • 8