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
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
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.
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).
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
.
Navigate as follows: 1.Click on 'File' then select 'Sync Project with Gradle Files'
This method worked for me.
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.
For me Project Structure ->JDK Location -> check on "Use embedded JDK" or use your own JDK This method worked for me