3

when I open my android studio, after completing the Gradle build, i get the following error "Failed to complete Gradle execution

cause:

write access is allowed from event dispatch thread only"

what do I do ?

Here is the picture of error message

enter image description here

coder
  • 8,346
  • 16
  • 39
  • 53
Taimoor Khan
  • 53
  • 1
  • 6

7 Answers7

1

I closed the IDE, deleted the .AndroidStudio3.0 folder in the user home and after i started it again that error disappeared. The IDE had also deactivated the android support plugin by itself. I exported the settings before deleting the folder to override the defaults quickly after 'reinstall'.

After importing all settings the error reappeared so I repeated the delete operation and then imported the all settings except the SDK settings and made it work. It seems some of the settings were changed, preventing the IDE from functioning.

Crispert
  • 1,102
  • 7
  • 13
1

I too faced the same problem, so I Invalidated cache and restarted. when restarts you will find the same problem, then click on Logcat you will find

Please configure Android SDK

then select your configuration what you used earlier as Oreo, Marshmallow, or others...

This worked for me.(Gradle Build Successfully).

  • it is better to explain the configuration in details that would help to solve the problem – coder May 03 '18 at 06:45
0

For me File > Sync with file system was fix.

0

Simple goto File -> Project Structure -> SDK Location (in your Android Studio), then check 'Use embedded JDK' checkbox and set JDK location to 'path to android studio'\Android Studio\jre.

Armali
  • 18,255
  • 14
  • 57
  • 171
Gourav Samre
  • 134
  • 1
  • 7
0

Navigate as follows: 1.Click on 'File' then select 'Sync Project with Gradle Files'

This method worked for me.

0

After spending 2 hours, I am able to fix this issue

Open Logcat -> it shows "Please Configure Android SDK." Tapping Configure , it will open project structure, set source and target compatibility -> OK.

it will build gradle successfully and make project runnable.

Shweta Shah
  • 97
  • 2
  • 6
0

For me Project Structure ->JDK Location -> check on "Use embedded JDK" or use your own JDK This method worked for me