Android 解决PM Gradle sync failed:PM Syncing only active variant问题

异常

项目编译的时候报如下错误

3:21 PM	Gradle sync started

3:21 PM	Source generation ended in 50 yr 5 mo 7 d 7 h 21 m 12 s 973 ms

3:21 PM	Project setup started

3:21 PM	Gradle sync failed: EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue@681bab3a
			Current thread: Thread[ApplicationImpl pooled thread 2288,4,Idea Thread Group] 526874562
			SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 1591159328 (2 s 259 ms)

3:21 PM	Syncing only active variant
			You can disable this experimental feature from
			File → Settings → Experimental → Gradle → Only sync the active variant

解决方法

log信息里已经说明了解决方法

找到File → Settings → Experimental → Gradle → Only sync the active variant项,取消选择

然后点击ok后重新编译即可

posted @ 2019-09-18 16:24  野猿新一  阅读(38)  评论(0编辑  收藏  举报