I have not used Android Studio 2.3.2 for 3 or 4 days and suddenly I have got the error below when I try to launch it. Note that I installed separately Android Studio 3.0 Canary 1 one week ago but everything was ok and both versions worked without problems. I don't understand why I suddenly have a problem to launch Android Studio.
I use a MacBook.
Here is the error log given by Android Studio at launch:
Internal Error. Please report to https://code.google.com/p/android/issues
java.lang.RuntimeException: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:203)
at com.intellij.idea.MainImpl$1.lambda$null$0(MainImpl.java:47)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:358)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:248)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:536)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:119)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$8(ApplicationImpl.java:429)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:436)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:103)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:392)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:384)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:196)
... 16 more
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 9 column 2 path $
at com.google.gson.Gson.assertFullConsumption(Gson.java:837)
at com.google.gson.Gson.fromJson(Gson.java:827)
at com.android.sdklib.repository.targets.PlatformTarget.getLibsFromJson(PlatformTarget.java:179)
at com.android.sdklib.repository.targets.PlatformTarget.<init>(PlatformTarget.java:124)
at com.android.sdklib.repository.targets.AndroidTargetManager.getTargetMap(AndroidTargetManager.java:94)
at com.android.sdklib.repository.targets.AndroidTargetManager.getTargets(AndroidTargetManager.java:80)
at com.android.sdklib.repository.targets.AndroidTargetManager.getTargetFromHashString(AndroidTargetManager.java:154)
at org.jetbrains.android.sdk.AndroidSdkData.findTargetByHashString(AndroidSdkData.java:216)
at org.jetbrains.android.sdk.AndroidSdkAdditionalData.getBuildTarget(AndroidSdkAdditionalData.java:126)
at org.jetbrains.android.sdk.AndroidPlatform.parse(AndroidPlatform.java:90)
at org.jetbrains.android.sdk.AndroidSdkAdditionalData.getAndroidPlatform(AndroidSdkAdditionalData.java:137)
at org.jetbrains.android.sdk.AndroidPlatform.getInstance(AndroidPlatform.java:68)
at com.android.tools.idea.startup.GradleSpecificInitializer.checkAndSetSources(GradleSpecificInitializer.java:459)
at com.android.tools.idea.startup.GradleSpecificInitializer.checkAndSetAndroidSdkSources(GradleSpecificInitializer.java:449)
at com.android.tools.idea.startup.GradleSpecificInitializer.run(GradleSpecificInitializer.java:121)
at com.android.tools.idea.AndroidInitialConfigurator.activateAndroidStudioInitializerExtensions(AndroidInitialConfigurator.java:198)
at com.android.tools.idea.AndroidInitialConfigurator.<init>(AndroidInitialConfigurator.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:495)
... 28 more
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 9 column 2 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1574)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1423)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:546)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:429)
at com.google.gson.Gson.assertFullConsumption(Gson.java:833)
... 54 more
Thanks for your help !
Fixed the problem.
What I have done:
close Android Studio
go to /users/your_name/library/preferences
rename the folder 'AndroidStudio2.3' to 'AndroidStudio2.3XXX' (or whatever :))
restart Android Studio
As my Android SDK was in located in an unusual folder, Android Studio asked me if I want to tell where is my SDK (choosing this option did not solve the problem) or install it at the default Android Studio location ; I chose this last option and it solved the issue !
There was a similar issue posted on Androids open source bug tracker: https://code.google.com/p/android/issues/detail?id=74458
The solution was to restart your computer. Try this and see if it works.
I had that crash too. I guess it was due to the upload of the last project. so to prevent that upload I moved it from the androidstudioprojects folder which is where all the projects are stored,and it solved the problem-the studio initialized well. but after that I brought the project back to that folder and opened it from the studio,and it was crashed again. since I have another newer version of android studio, I used it to open that project. after it finished the whole process (indexing,building etc) I closed that project and tried again to open from the first version of the studio and it succeeded.
I guess last time I worked with that project I closed it not well (through task manager) and it affected something.
Related
FYI: kafka noob here
I downloaded Offset Explorer 2 (Kafka Tool) on my Mac and when I open it, it shows up in my Activity Monitor for a few seconds and then closed. No UI appears and there is no error message displayed.
However, I was able to see the error log:
...
ERROR com.kafkatool.ui.MainApp - Error starting main application
java.lang.NullPointerException
at java.awt.Window.init(Window.java:497)
at java.awt.Window.<init>(Window.java:537)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at com.kafkatool.ui.MainFrame.<init>(MainFrame.java:97)
at com.kafkatool.ui.MainApp.<init>(MainApp.java:33)
at com.kafkatool.ui.MainApp.main(MainApp.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:52)
What I have tried:
Uninstalling/Reinstalling
I tried installing via HomeBrew
I tried installing via downloading it form the official site
I tried uninstalling/reinstalling different version of Java (openJDK and the name-brand stuff)
rebooting
None of the above seems to have any affect. I still see the same error message in the log
I have an app that pass a lint test on circleCI, but fail on local machine with the following error
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3090)
at java.base/java.lang.Class.getConstructor0(Class.java:3295)
at java.base/java.lang.Class.newInstance(Class.java:532)
at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:50)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension$loadProcessors$efficientProcessorLoader$1.doLoadProcessors(Kapt3Extension.kt:83)
at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors(ProcessorLoader.kt:45)
at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors$default(ProcessorLoader.kt:28)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.loadProcessors(Kapt3Extension.kt:88)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:171)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:98)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:96)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:106)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:384)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:70)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:375)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:123)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:131)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:54)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:103)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:442)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:102)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:1027)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:102)
at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:1069)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:1026)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:441)
at jdk.internal.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 48 more
I do not use JAXB and I have no idea where does this come from. More frustrating is I can build my app without any error.
I have tried the solutions in the following links, but none of them works for my case.
https://www.concretepage.com/questions/556
How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9
Has anyone experienced similar issues?
The JAXB APIs are considered to be J2EE APIs, therefore not present default class path in Java SE 9. In JDK 11 they are completely removed. But, these Java EE APIs that were provided in JDK 6/7/8 are still in the JDK.
Edit 10/2020:
I ran into this issue again some time ago when CircleCi update their java image from jdk8 to jdk11. I was able to solve this issue by updating the Gradle tool. Looks like in the latest version of Gradle lint no longer use JAXB APIs.
Old answer: Today I finally solve this issue. Here is what I did.
I attempted to solve this issue by reinstalling Android Studio 3.4. However I couldn't even start up Android Studio and I ran into this
java.lang.RuntimeException:
com.intellij.ide.plugins.PluginManager$StartupAbortedException:
Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
Then I looked for answers and came across this page
[Can't start Android Studio][1]
[1]: https://superuser.com/questions/1391452/cant-start-android-studio
I reverted back to use jdk 8.
Android Studio 3.4 finally started up, and JAXBException was gone.
While developing an app for Android, I was able to debug native and managed code. But, once I disconnected the cable while in debug session and I close manually on the smartphone the app, it becomes undebugeable again:
java.lang.Throwable: LLDB server not found
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:137)
at com.android.tools.ndk.run.lldb.ConnectLLDBTask.newSessionStarter(ConnectLLDBTask.java:360)
at com.android.tools.ndk.run.lldb.ConnectLLDBTask.access$200(ConnectLLDBTask.java:91)
at com.android.tools.ndk.run.lldb.ConnectLLDBTask$3.createDebugProcess(ConnectLLDBTask.java:598)
at com.jetbrains.cidr.execution.testing.CidrLauncher.startDebugProcess(CidrLauncher.java:29)
at com.jetbrains.cidr.execution.CidrCommandLineState.startDebugProcess(CidrCommandLineState.java:30)
at com.jetbrains.cidr.execution.CidrRunner$1.start(CidrRunner.java:63)
at com.intellij.xdebugger.impl.XDebuggerManagerImpl.startSession(XDebuggerManagerImpl.java:205)
at com.intellij.xdebugger.impl.XDebuggerManagerImpl.startSession(XDebuggerManagerImpl.java:166)
at com.jetbrains.cidr.execution.CidrRunner.startDebugSession(CidrRunner.java:56)
at com.android.tools.ndk.run.lldb.ConnectLLDBTask.launchCidrDebugger(ConnectLLDBTask.java:628)
at com.android.tools.ndk.run.lldb.ConnectLLDBTask.launchDebugger(ConnectLLDBTask.java:296)
at com.android.tools.idea.run.tasks.ConnectDebuggerTask.lambda$perform$0(ConnectDebuggerTask.java:90)
at com.intellij.util.ui.UIUtil$12.run(UIUtil.java:3098)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:755)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
the before stacktrace is from Android Studio after launching debug, it appears an ! at bottom right.
Then, the result in Debug window is:
Now Launching Native Debug Session
Error while starting native debug session: com.intellij.execution.ExecutionException: Index: 0, Size: 0
I am not able to debug now! That is happening to me and I am able to fix it by following these steps:
Close Android Studio.
Delete c:\Users\<USER>\{.android, .gradle, .AndroidStudio3.3}
Delete <ProjectFolder>\{.gradle, .idea}
Delete tmp files in AppData.
Open and re-debug app.
I found a faster way to temporally solve it by deleting two directories:
Close Android Studio
Delete c:\Users\<USER>\.lldb
Delete c:\Users\<USER>\.AndroidStudio3.4\system\tmp\*
Re-open Android Studio
Now you should be able to debug again
I was getting the same exception Error while starting native debug session: com.intellij.execution.ExecutionException
Then following helps me. Check if this can helps you...
Or open run configurations
Then check this...
What worked for me was uninstalling the apk and reinstalling it (using the debugger). Android Studio version 2021.1.1 for Ubuntu 18.04
After upgrading to Android Studio 2.0 Preview I see the following exception when I try to build a project
Error:Internal error: (java.lang.ClassNotFoundException) com.android.repository.io.FileOpUtils
java.lang.ClassNotFoundException: com.android.repository.io.FileOpUtils
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.android.sdklib.repository.local.LocalSdk.<init>(LocalSdk.java:182)
at com.android.sdklib.repository.local.LocalSdk.<init>(LocalSdk.java:191)
at org.jetbrains.jps.android.AndroidBuildDataCache.getSdk(AndroidBuildDataCache.java:145)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:403)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:478)
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:83)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:266)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
It is a known issue but any comments there are "me too".
Has anyone been able to workaround this?
Update
This issue has been resolved in 2.0 Preview 4.
A workaround was posted in a comment to the issue filed.
On my Mac I performed the following steps in a Terminal:
vi /Applications/Android\ Studio.app/Contents/plugins/android/lib/android.jar
Select META-INF/plugin.xml for editing.
Add ;repository.jar to the classpath attribute in the line <compileServer.plugin classpath="sdklib.jar;common.jar;jarutils.jar;layoutlib-api.jar;manifest-merger.jar"/> and save changes.
Open Android Studio
As mentioned in the comment you may need to apply this workaround again after further updates to Android Studio if the issue still hasn't been resolved.
Warning
After applying the above changes Android Studio is no longer able to apply patch updates. You get a warning like that shown in this question. It seems the only solution is a re-install. According to the comments on the issue though the problem still exists in the latest build.
I've a Xamarin Android app running on Visual Studio 2015. Since a few days I'm no longer able to edit XML layout files into Android Designer getting the following error:
java.lang.NoClassDefFoundError: com/android/utils/ILogger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
Exception in thread "main"
I've already tried to update JAVA (to jdk 1.8) and setting it, update Xamarin to the lastest version and installed almost all missing Android SDK versions and tools.
Any idea on how to fix it to come back to edit & visualize Android xml/axml layout activities?
In my case it was fixed by removing the Preview Channel Packages and install the previous version packages.
Open Android SDK Manager and delete "Tools (Preview Channel) > Android SDK Tools". Install previous version Android SDK Platform Tools (in my case Rev 23.1)