Android studio crashing after changing SDK to 12 - android

so i tried changing my jdk from jdk8 to jdk12
and it's now crashing whenever i try to start it.
the
sudo /Applications/Android\ Studio.app/Contents/MacOS/studio
works for me when i try to launch my android studio
but then i dont work when i manually select android studio application
and it show this error:
nternal 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:224)
at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:77)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:348)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
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:258)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:504)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:104)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:447)
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.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:471)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:88)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:405)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:391)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:217)
... 15 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:157)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:76)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:82)
at org.jetbrains.android.sdk.AndroidSdkData.<init>(AndroidSdkData.java:139)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:104)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:78)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:112)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:119)
at org.jetbrains.android.sdk.AndroidPlatform.parse(AndroidPlatform.java:86)
at org.jetbrains.android.sdk.AndroidSdkAdditionalData.getAndroidPlatform(AndroidSdkAdditionalData.java:127)
at org.jetbrains.android.sdk.AndroidPlatform.getInstance(AndroidPlatform.java:68)
at com.android.tools.idea.sdk.IdeSdks.getEligibleAndroidSdks(IdeSdks.java:600)
at com.android.tools.idea.sdk.IdeSdks.getFirstAndroidSdk(IdeSdks.java:193)
at com.android.tools.idea.sdk.IdeSdks.getAndroidSdkPath(IdeSdks.java:119)
at com.android.tools.idea.startup.GradleSpecificInitializer.setupSdks(GradleSpecificInitializer.java:304)
at com.android.tools.idea.startup.GradleSpecificInitializer.run(GradleSpecificInitializer.java:128)
at com.android.tools.idea.AndroidInitialConfigurator.activateAndroidStudioInitializerExtensions(AndroidInitialConfigurator.java:202)
at com.android.tools.idea.AndroidInitialConfigurator.<init>(AndroidInitialConfigurator.java:71)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:85)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:62)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:45)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:462)
... 27 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema PluginClassLoader[org.jetbrains.android, 10.3.4.2] com.intellij.ide.plugins.cl.PluginClassLoader#71677abb
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:49)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 55 more
I tried reinstalling my android studio but still same error.

Know the compatibility of JDK for your version IntelliJ. Here is the link https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
Make sure your computer has the path for java. Try "java -version" in cmd to know your version.
Try running with admin privilege.

Related

Exception in plugin AppDynamics Android Agent Installer 1.1.38

I am unable to install the plugin AppDynamics Android Agent Installer from the marketplace of android studio. I'm getting below exception stack trace.
java.lang.NoClassDefFoundError: com/android/tools/idea/gradle/parser/GradleBuildFile
at com.appdynamics.androidstudioplugin.installer.BuildGradleFinder.findBuildGradle(BuildGradleFinder.java:19)
at com.appdynamics.androidstudioplugin.screens.ScreenController.setChosenModule(ScreenController.java:122)
at com.appdynamics.androidstudioplugin.screens.ModulePickerScreen$2.mouseClicked(ModulePickerScreen.java:196)
at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
at java.desktop/java.awt.Component.processEvent(Component.java:6419)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:971)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:906)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:838)
at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:808)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:505)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.android.tools.idea.gradle.parser.GradleBuildFile PluginClassLoader[PluginDescriptor(name=AppDynamics Android Agent Installer, id=com.appdynamics.androidstudioplugin, path=C:\Users\Administrator\AppData\Roaming\Google\AndroidStudio4.2\plugins\plugin, version=1.1.38)] com.intellij.ide.plugins.cl.PluginClassLoader#405b4138
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:95)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 42 more
I tried changing Gradle versions but still tucked here.
Here are my project configurations
Android Gradle plugin version : 3.2.1
Gradle version : 4.8.1
Kotin version : 1.3.11
Target & Compatible JDK : Java 8
I also have some screenshots attached.
This is likely due to using a newer version of Android Studio then is supported with the "Android Agent Installer" methodology:
"Android Studio 2.1.0 - 2.9.9, 3.2.1 - 3.9.9 (Not supported: 3.0.0 - 3.2.0, 4.0)" - from https://docs.appdynamics.com/21.9/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/instrument-an-application-with-the-android-agent-installer
Instead, follow these instructions to build using Gradle with the latest version: https://docs.appdynamics.com/21.9/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/instrument-an-android-application-manually#InstrumentanAndroidApplicationManually-gradle-android-studio

Error in IntelliJ when building flutter app

I get the error below when trying to build an flutter app in IntelliJ
Error:Internal error: (java.lang.ClassNotFoundException) javax.xml.bind.annotation.XmlSchema
java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:157)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:76)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:82)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:405)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:481)
at org.jetbrains.jps.android.builder.AndroidPreDexBuildTarget.computeRootDescriptors(AndroidPreDexBuildTarget.java:111)
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:274)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:232)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
I am using android sdk 29.
I fixed it by downloading and using the Android SDK 28.

Cannot build empty flutter project with intellij or android studio

I have been coding kotlin in intellij to develop an app for android but then found out about flutter and wanted to give it a try. Installed flutter sdk and flutter and dart plugins ok. Now even the default empty demo project runs in both my phone and in emulator but i can't build it and cannot generate an apk. I have also downloaded the android studio to try with it but a similar error occurs in it too.
Searched all the web for a solution.
ERROR IN THE INTELLIJ
Error:Internal error: (java.lang.ClassNotFoundException) javax.xml.bind.annotation.XmlSchema
java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:157)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:76)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:82)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:405)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:481)
at org.jetbrains.jps.android.builder.AndroidPreDexBuildTarget.computeRootDescriptors(AndroidPreDexBuildTarget.java:111)
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:85)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:265)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:121)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:228)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
ERROR IN THE ANDROID STUDIO
Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
java.lang.ClassNotFoundException: com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.intellij.util.indexing.counters.IndexCounters.<clinit>(IndexCounters.java:34)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:85)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex$CompilerMapReduceIndex.<init>(CompilerReferenceIndex.java:232)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex.<init>(CompilerReferenceIndex.java:79)
at org.jetbrains.jps.backwardRefs.JavaCompilerBackwardReferenceIndex.<init>(JavaCompilerBackwardReferenceIndex.java:12)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexWriter.initialize(JavaBackwardReferenceIndexWriter.java:79)
at org.jetbrains.jps.incremental.java.JavaBuilder.buildStarted(JavaBuilder.java:148)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:363)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:139)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:228)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)

Android Studio missing libXrender.so.1

I've installed Android Studio on debian Linux (sid). According to the installation instructions, I have run
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
but upon start, Android Studio crashes, complaining about missing libXrender.so.1:
java.lang.reflect.InvocationTargetException
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.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:86)
Caused by: java.lang.UnsatisfiedLinkError: /home/phihag/android-studio/jre/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:101)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:74)
... 6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.awt.Component.<clinit>(Component.java:594)
at com.intellij.idea.Main.showMessage(Main.java:198)
at com.intellij.idea.Main.showMessage(Main.java:174)
at com.intellij.idea.Main.showMessage(Main.java:153)
at com.intellij.idea.Main.main(Main.java:89)
The installation instructions are incomplete and assume the (x86_64) system already has various common graphical libraries installed. You also need to install:
sudo apt install libxrender-dev libxtst6 libfreetype6

Android draw9patch throws NoClassDefFoundError

I upgraded to Android SDK Tools r8 today and I can't seem to run the draw9patch tool. I'm getting the following error:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/swingworker/SwingWorker
at com.android.draw9patch.Application$1.run(Application.java:48)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingworker.SwingWorker
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 9 more
I'm running snow leopard and have jre (or jdk?) 1.6.
Any ideas how to get this working? Thanks!
I have found a solution(Ubuntu 10.10, java-6-sun). Copy swing-worker.jar into /path_to_android_sdk/tools/lib. You can find swing-worker-1.1.jar in the same directory in SDK r7 or download it from here.

Categories

Resources