Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Internal error: (java.lang.NoSuchMethodError) affecting all my projects

m following The Nerd ranch guide to android development using Intellij and everything was smooth sailing until I came to the code challenge which required to use DateFormat instead of outputting a timestamp. I'm made my changes when I tried to compile I found my app crashed so I undo whatever changes I did to it to my last successful build but still my app crashed so I rebuilt the project and now I get this:

    Error:Internal error: (java.lang.NoSuchMethodError) com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
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.LocalPlatformPkgInfo.createAndroidTarget(LocalPlatformPkgInfo.java:158)
    at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getAndroidTarget(LocalPlatformPkgInfo.java:95)
    at com.android.sdklib.repository.local.LocalSdk.getTargets(LocalSdk.java:702)
    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: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)

Now it is affecting all my previous projects that worked fine before, I tried to Invalidate the cache / restart and opening a new Emulator and copy pasting the code from the source and still I have the same problem and I still don't know what cause it.

like image 823
Medo Avatar asked Jul 21 '14 19:07

Medo


2 Answers

Are you using IntelliJ 13.1.4? If so, this appears to be a bug in this version of the IDE. http://youtrack.jetbrains.com/issue/IDEA-127374

http://blog.jetbrains.com/idea/2014/06/intellij-idea-13-1-4-eap-135-1019-is-out/

Try downgrading to 13.1.3. http://confluence.jetbrains.com/pages/viewpage.action?pageId=54329349

like image 105
Caretaker007 Avatar answered Oct 19 '22 01:10

Caretaker007


I have the same problem here. and i found this http://youtrack.jetbrains.com/issue/IDEA-127374

it seems that Intellij has released a fixed version, I am currently downloading it.

Maxim Mossienko 22 Jul 2014, 01:36 IntelliJ Idea 14.1.4b build 135.1230 is uploaded, you can download it with direct download links: http://download.jetbrains.com/idea/ideaIC-13.1.4b.* or http://download.jetbrains.com/idea/ideaIU-13.1.4b.* (replace * with your OS specific suffix)

update 0: I have installed the fixed version, it is building android project correctly.

update 1: go for 1230 and later version with Windows: http://download.jetbrains.com/idea/ideaIU-13.1.4b.exe

like image 44
ShinChven Avatar answered Oct 19 '22 01:10

ShinChven