as 抽抽了 INFO - e.project.sync.GradleSyncState - Gradle sync failed

祁远
2023-12-01

昨天还运行的好好地,今天上班打卡as提示:“INFO - e.project.sync.GradleSyncState - Gradle sync failed: Illegal char <:> at index 8: D:/pos/D:.pos.iml (4 s 246 ms)”

具体如下:

INFO - e.project.sync.GradleSyncState - Gradle sync failed: Illegal char <:> at index 8: D:/pos/D:.pos.iml (9 s 103 ms) 
2019-05-13 09:47:39,501 [e-1343-b01]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender deactivation event: SYNC_FINISHED 
2019-05-13 09:47:39,501 [e-1343-b01]   INFO - a.gradle.util.BatchUpdatesUtil - Finishing batch update for project: Project 'D:\pos' pos 
2019-05-13 09:47:39,518 [ thread 31]   INFO - ty.VersionCompatibilityChecker - Failed to read version for component 'android-gradle-plugin' for project 'pos' 
2019-05-13 09:47:39,533 [ thread 31]   INFO - ty.VersionCompatibilityChecker - Failed to read version for component 'android-gradle-plugin' for project 'pos' 
2019-05-13 09:47:42,542 [ thread 33]   INFO - roid.tools.ndk.GradleWorkspace - Updating model took 0.001s 
2019-05-13 09:47:42,634 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 57 ms 
2019-05-13 09:47:42,637 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Building symbols in FAST mode, 0 source files from total 0 project files 
2019-05-13 09:47:42,637 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 3 ms 
2019-05-13 09:47:42,637 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Loading Header Maps finished in 0 ms 
2019-05-13 09:47:42,638 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Loading Module Maps finished in 1 ms 
2019-05-13 09:47:42,638 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Saving Module Maps finished in 0 ms 
2019-05-13 09:47:42,639 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Loaded 0 tables for 0 files (0 project files) 
2019-05-13 09:47:42,639 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Building symbols for 0 source files 
2019-05-13 09:47:42,642 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Building symbols for 0 unused headers 
2019-05-13 09:47:42,643 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 4 ms 
2019-05-13 09:47:42,645 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Saving modified symbols for 0 files (0 tables of total 0) 
2019-05-13 09:47:42,646 [ thread 34]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 1 ms 
2019-05-13 09:51:46,343 [e-1343-b01]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender activation event: SYNC_TASK_CREATED 
2019-05-13 09:51:46,448 [e-1343-b01]   INFO - e.project.sync.GradleSyncState - Started sync with Gradle for project 'pos'. 
2019-05-13 09:51:46,459 [e-1343-b01]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender activation event: SYNC_STARTED 
2019-05-13 09:51:46,459 [e-1343-b01]   INFO - a.gradle.util.BatchUpdatesUtil - Starting batch update for project: Project 'D:\pos' pos 
2019-05-13 09:51:46,490 [ thread 41]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/Program Files/Android/Android Studio/jre 
2019-05-13 09:51:46,491 [ thread 41]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/Program Files/Android/Android Studio/jre 
2019-05-13 09:51:46,499 [ thread 41]   INFO - xecution.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: -Didea.version=3.4 -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.4.0.18 --init-script C:\Users\ls\AppData\Local\Temp\ijinit1.gradle 
2019-05-13 09:52:00,385 [ thread 41]   INFO - System.util.ExternalSystemUtil - External project [D:/pos] resolution task executed in 13907 ms. 
2019-05-13 09:52:00,385 [ thread 41]   INFO - e.project.sync.GradleSyncState - Started setup of project 'pos'. 
2019-05-13 09:52:00,391 [e-1343-b01]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender activation event: SETUP_STARTED 
2019-05-13 09:52:00,515 [ thread 41]   WARN - ea.IdeaSyncPopulateProjectTask - Sync failed: Illegal char <:> at index 8: D:/pos/D:.pos.iml 
java.nio.file.InvalidPathException: Illegal char <:> at index 8: D:/pos/D:.pos.iml
	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
	at java.nio.file.Paths.get(Paths.java:84)
	at com.intellij.configurationStore.ModuleStateStorageManager.createFileBasedStorage(ModuleStateStorageManager.kt:73)
	at com.intellij.configurationStore.StateStorageManagerImpl.createStateStorage(StateStorageManagerImpl.kt:260)
	at com.intellij.configurationStore.StateStorageManagerImpl.getOrCreateStorage(StateStorageManagerImpl.kt:172)
	at com.intellij.configurationStore.StateStorageManagerImpl.getOrCreateStorage$default(StateStorageManagerImpl.kt:156)
	at com.intellij.configurationStore.ModuleStoreBase.setPath(ModuleStoreImpl.kt:71)
	at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.lambda$newModule$0(ModuleManagerImpl.java:753)
	at com.intellij.openapi.module.impl.ModuleImpl.lambda$init$0(ModuleImpl.java:75)
	at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:86)
	at com.intellij.openapi.module.impl.ModuleImpl.init(ModuleImpl.java:71)
	at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.initModule(ModuleManagerImpl.java:815)
	at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.newModule(ModuleManagerImpl.java:752)
	at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.newModule(ModuleManagerImpl.java:735)
	at com.intellij.openapi.externalSystem.service.project.AbstractIdeModifiableModelsProvider.newModule(AbstractIdeModifiableModelsProvider.java:140)
	at com.intellij.openapi.externalSystem.service.project.AbstractIdeModifiableModelsProvider.newModule(AbstractIdeModifiableModelsProvider.java:170)
	at com.intellij.openapi.externalSystem.service.project.manage.AbstractModuleDataService.createModules(AbstractModuleDataService.java:131)
	at com.intellij.openapi.externalSystem.service.project.manage.AbstractModuleDataService.importData(AbstractModuleDataService.java:93)
	at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.doImportData(ProjectDataManagerImpl.java:292)
	at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:167)
	at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:245)
	at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:252)
	at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doPopulateProject(IdeaSyncPopulateProjectTask.java:121)
	at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:98)
	at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:40)
	at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:87)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2019-05-13 09:52:00,516 [ thread 41]   INFO - e.project.sync.GradleSyncState - Gradle sync failed: Illegal char <:> at index 8: D:/pos/D:.pos.iml (14 s 68 ms) 
2019-05-13 09:52:00,520 [e-1343-b01]   INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender deactivation event: SYNC_FINISHED 
2019-05-13 09:52:00,520 [e-1343-b01]   INFO - a.gradle.util.BatchUpdatesUtil - Finishing batch update for project: Project 'D:\pos' pos 
2019-05-13 09:52:03,746 [ thread 34]   INFO - roid.tools.ndk.GradleWorkspace - Updating model took 0.001s 
2019-05-13 09:52:03,878 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 32 ms 
2019-05-13 09:52:03,880 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Building symbols in FAST mode, 0 source files from total 0 project files 
2019-05-13 09:52:03,881 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 3 ms 
2019-05-13 09:52:03,881 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Loading Header Maps finished in 0 ms 
2019-05-13 09:52:03,882 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Loading Module Maps finished in 1 ms 
2019-05-13 09:52:03,883 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Saving Module Maps finished in 1 ms 
2019-05-13 09:52:03,883 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Loaded 0 tables for 0 files (0 project files) 
2019-05-13 09:52:03,883 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Building symbols for 0 source files 
2019-05-13 09:52:03,887 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Building symbols for 0 unused headers 
2019-05-13 09:52:03,887 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 4 ms 
2019-05-13 09:52:03,892 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Saving modified symbols for 0 files (0 tables of total 0) 
2019-05-13 09:52:03,892 [ thread 41]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 0 ms 
2019-05-13 09:52:58,267 [e-1343-b01]   INFO - ide.actions.ShowFilePathAction - 
Exit code 1 


参考文章:

1、https://blog.csdn.net/qq_38280242/article/details/81145682

2、https://blog.csdn.net/baidu_19473529/article/details/80383571

3、https://ask.csdn.net/questions/670030

以上文章不知道对我的问题,药不对症,

现象:

1、在build提示:NFO - e.project.sync.GradleSyncState - Gradle sync failed: Illegal char <:> at index 8: D:/pos/D:.pos.iml (4 s 246 ms)

2、xxx.iml(xxx是你项目名)显示的是 build.gradle的部分内容

偶然发现了这个问题,Mark一下

造成的原因,没找到,,,

解决方法:

找到自己项目下的 xxx.iml(xxx是你项目名),我的在D:\xxx\xxx.iml,用文本打开,然后复制(最好用notepad++应用打开,wins自带的记事本打开乱码),在项目里找到该文件   粘贴,重新编译ok

 类似资料: