IntelliJ IDEA com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable

时间:2021-02-22 09:37:55
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">用新IDE,在官网下了个IntelliJ IDEA 13.1.4,在跑android工程的时候出现以下问题:</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
</span>
<span style="font-family: Arial, Helvetica, sans-serif;">Error:Internal error: (java.lang.NoSuchMethodError) com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"></span><pre name="code" class="java">java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
	at com.android.sdklib.internal.project.ProjectProperties.parsePropertyStream(ProjectProperties.java:541)
	at com.android.sdklib.repository.local.LocalAddonPkgInfo.parseAddonProperties(LocalAddonPkgInfo.java:370)
	at com.android.sdklib.repository.local.LocalAddonPkgInfo.createAndroidTarget(LocalAddonPkgInfo.java:199)
	at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getAndroidTarget(LocalPlatformPkgInfo.java:95)
	at com.android.sdklib.repository.local.LocalAddonPkgInfo.getVendorId(LocalAddonPkgInfo.java:110)
	at com.android.sdklib.repository.local.LocalAddonPkgInfo$1.getVendorId(LocalAddonPkgInfo.java:96)
	at com.android.sdklib.repository.descriptors.PkgDescAddon.getVendorId(PkgDescAddon.java:93)
	at com.android.sdklib.repository.descriptors.PkgDesc.compareTo(PkgDesc.java:226)
	at com.android.sdklib.repository.descriptors.PkgDesc.compareTo(PkgDesc.java:42)
	at com.android.sdklib.repository.local.LocalPkgInfo.compareTo(LocalPkgInfo.java:126)
	at com.android.sdklib.repository.local.LocalPkgInfo.compareTo(LocalPkgInfo.java:40)
	at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:35)
	at com.google.common.collect.NaturalOrdering.compare(NaturalOrdering.java:26)
	at java.util.TreeMap.compare(TreeMap.java:1188)
	at java.util.TreeMap.put(TreeMap.java:531)
	at java.util.TreeSet.add(TreeSet.java:255)
	at com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection.add(AbstractMapBasedMultimap.java:503)
	at com.android.sdklib.repository.local.LocalSdk.scanAddons(LocalSdk.java:916)
	at com.android.sdklib.repository.local.LocalSdk.getPkgsInfos(LocalSdk.java:566)
	at com.android.sdklib.repository.local.LocalSdk.getTargets(LocalSdk.java:694)
	at com.android.sdklib.repository.local.LocalSdk.getTargetFromHashString(LocalSdk.java:722)
	at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:375)
	at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:448)
	at org.jetbrains.jps.android.builder.AndroidPreDexBuildTarget.computeRootDescriptors(AndroidPreDexBuildTarget.java:110)
	at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.addRoots(BuildRootIndexImpl.java:72)
	at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.<init>(BuildRootIndexImpl.java:62)
	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:76)
	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)
	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)


 
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">找了一个星期都没解决,最后在google上有人提示了说13.1.4版本有bug,之后官方又发布了13.1.4b版本,就解决了该问题</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">13.1.4b  window版本下载地址为:</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">http://download-cf.jetbrains.com/idea/ideaIU-13.1.4b.exe
</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
</span>