Andrid Studio Gradle sync failed: A problem occurred configuring project': app'solution

Keywords: Mobile Gradle Android Java SDK

This error occurred while I was working on Gradle sync in Android Studio. The Android Studio error prompt was Gradle sync failed: A problem occurred configuring project': app', and the last lines of the error log were like this.

2018-10-30 21:05:30,041 [thread 106]   WARN - ect.sync.idea.ProjectSetUpTask - A problem occurred configuring project ':app'. 
2018-10-30 21:05:30,041 [thread 106]   INFO - e.project.sync.GradleSyncState - Gradle sync failed: A problem occurred configuring project ':app'.

Consult IDE log for more details (Help | Show Log) (379 ms) 
2018-10-30 21:05:30,044 [e-1136-b06]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender deactivation event: SYNC_FINISHED 
2018-10-30 21:05:30,044 [e-1136-b06]   INFO - idea.project.IndexingSuspender - Finishing batch update for project: Project 'D:\Projects\AndroidApplication' AndroidApplication 
2018-10-30 21:05:30,113 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 0.022 s. 
2018-10-30 21:05:30,113 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Building symbols in FAST mode, 0 source files from total 0 project files 
2018-10-30 21:05:30,114 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 0.000 s. 
2018-10-30 21:05:30,114 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Loading Header Maps finished in 0.000 s. 
2018-10-30 21:05:30,114 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Loading Module Maps finished in 0.000 s. 
2018-10-30 21:05:30,115 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Saving Module Maps finished in 0.001 s. 
2018-10-30 21:05:30,115 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Loaded 0 tables for 0 files (0 project files) 
2018-10-30 21:05:30,115 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Building symbols for 0 source files 
2018-10-30 21:05:30,118 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Building symbols for 0 unused headers 
2018-10-30 21:05:30,119 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 0.004 s. 
2018-10-30 21:05:30,120 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Saving modified symbols for 0 files (0 tables of total 0) 
2018-10-30 21:05:30,120 [thread 107]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 0.000 s. 
2018-10-30 21:05:41,361 [e-1136-b06]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender activation event: SYNC_TASK_CREATED 
2018-10-30 21:05:41,375 [e-1136-b06]   INFO - e.project.sync.GradleSyncState - Started sync with Gradle for project 'AndroidApplication'. 
2018-10-30 21:05:41,377 [e-1136-b06]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender activation event: SYNC_STARTED 
2018-10-30 21:05:41,377 [e-1136-b06]   INFO - idea.project.IndexingSuspender - Starting batch update for project: Project 'D:\Projects\AndroidApplication' AndroidApplication 
2018-10-30 21:05:41,388 [thread 107]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from E:/AndroidStudio/jre 
2018-10-30 21:05:41,391 [thread 107]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from E:/AndroidStudio/jre 
2018-10-30 21:05:41,398 [thread 107]   INFO - xecution.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: -Didea.version=3.2 -Djava.awt.headless=true -Pandroid.injected.build.model.only=true -Pandroid.injected.build.model.only.advanced=true -Pandroid.injected.invoked.from.ide=true -Pandroid.injected.build.model.only.versioned=3 -Pandroid.injected.studio.version=3.2.0.26 -Pandroid.builder.sdkDownload=false --init-script C:\Users\xxxx\AppData\Local\Temp\ijinit.gradle 
2018-10-30 21:08:38,848 [e-1136-b06]   INFO - ide.actions.ShowFilePathAction - 
Exit code 1 

After searching the Internet for a circle, I did not solve the problem. Finally, I put my eyes on this': app'. I noticed that there was a file named settings.gradle in the project. When I opened it, its content was include d': app'. I added an English sentence before this app with the attitude of a dead horse and a living horse doctor. I didn't expect sync to succeed after that. It was very happy and crying!

(Whisper Ratio: Android Studio is really the worst IDE I've ever used. It's rare for Android SDK to have trouble configuring, downloading files, and compiling errors.)

Posted by jp2php on Wed, 23 Jan 2019 00:42:13 -0800