I'm trying to run Android-Studio on a Debian Jessie machine, but it won't.
Just unpacked it, marked bin/studio.sh as executable and executed it.
All I get is the following stacktrace:
Exception in thread "main" java.lang.NoClassDefFoundError: com/intellij/openapi/diagnostic/Logger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getMethod0(Class.java:2856)
at java.lang.Class.getMethod(Class.java:1668)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.intellij.openapi.diagnostic.Logger
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
No log is written or anything else. Already searched and tried various things (e.g. adding lib/openapi.jar manually to the classpath, etc) for more than an hour, but it is still not working
Please ensure that there are no spaces in the path where Android Studio is installed.
Related
Updating Gradle from version 4.2.0 to 7.0.2. ended up in an error during minifying with R8. (Using Java 1.8)
Unfortunately, the error message is not very telling (see below).
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at Version.fakeStackEntry(Version_3.0.69.java:0)
at com.android.tools.r8.utils.w.a(SourceFile:68)
at com.android.tools.r8.utils.w.a(SourceFile:28)
at com.android.tools.r8.utils.w.a(SourceFile:27)
at com.android.tools.r8.R8.a(R8.java:29)
at com.android.tools.r8.R8.run(R8.java:3)
at com.android.builder.dexing.R8Tool.runR8(r8Tool.kt:301)
at com.android.build.gradle.internal.tasks.R8Task$Companion.shrink(R8Task.kt:592)
at com.android.build.gradle.internal.tasks.R8Task.doTaskAction(R8Task.kt:443)
at com.android.build.gradle.internal.tasks.NonIncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(BaseTask.kt:63)
at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:51)
at com.android.build.gradle.internal.tasks.NonIncrementalTask.taskAction(NonIncrementalTask.kt:94)
at jdk.internal.reflect.GeneratedMethodAccessor512.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
... 118 more
Caused by: java.lang.NullPointerException: Cannot invoke "com.android.tools.r8.graph.B.F()" because "<parameter1>" is null
Did anybody face / solve the same problem?
I am compiling android project with Facebook's buck build system. But getting the following error.
With error I can conclude that it is trying to find the platform android-9 but ndk directory have platforms starting from android-14.
I have searched but didn't find anything regarding changing the ndk platform in buck.
Exception I am getting.
2018-02-26 08:44:49.659][error][command:null][tid:73][com.facebook.buck.cli.Main] Uncaught exception at top level
com.google.common.util.concurrent.ExecutionError: java.lang.AssertionError: /Users/user/android-ndk-r16b/platforms/android-9/arch-arm doesn't exist.
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2216)
at com.google.common.cache.LocalCache.get(LocalCache.java:4147)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5146)
at com.facebook.buck.rules.AbstractKnownBuildRuleTypesProvider.get(AbstractKnownBuildRuleTypesProvider.java:67)
at com.facebook.buck.rules.KnownBuildRuleTypesProvider.get(KnownBuildRuleTypesProvider.java:15)
at com.facebook.buck.parser.PerBuildState.getTargetNodeJob(PerBuildState.java:165)
at com.facebook.buck.parser.Parser.resolveTargetSpecs(Parser.java:497)
at com.facebook.buck.parser.Parser.buildTargetGraphForTargetNodeSpecs(Parser.java:395)
at com.facebook.buck.cli.BuildCommand.createUnversionedTargetGraph(BuildCommand.java:958)
at com.facebook.buck.cli.BuildCommand.createGraphs(BuildCommand.java:419)
at com.facebook.buck.cli.BuildCommand.executeBuildAndProcessResult(BuildCommand.java:507)
at com.facebook.buck.cli.BuildCommand.run(BuildCommand.java:391)
at com.facebook.buck.cli.BuildCommand.runWithoutHelp(BuildCommand.java:358)
at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:232)
at com.facebook.buck.cli.AbstractContainerCommand.run(AbstractContainerCommand.java:79)
at com.facebook.buck.cli.BuckCommand.run(BuckCommand.java:82)
at com.facebook.buck.cli.Main.runMainWithExitCode(Main.java:1101)
at com.facebook.buck.cli.Main.runMainThenExit(Main.java:395)
at com.facebook.buck.cli.Main.nailMain(Main.java:1855)
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.martiansoftware.nailgun.NGSession.run(NGSession.java:329)
Caused by: java.lang.AssertionError: /Users/user/android-ndk-r16b/platforms/android-9/arch-arm doesn't exist.
at com.facebook.infer.annotation.Assertions.assertCondition(Assertions.java:72)
at com.facebook.buck.android.NdkCxxPlatforms$NdkCxxToolchainPaths.processPathPattern(NdkCxxPlatforms.java:956)
at com.facebook.buck.android.NdkCxxPlatforms$NdkCxxToolchainPaths.processPathPattern(NdkCxxPlatforms.java:969)
at com.facebook.buck.android.NdkCxxPlatforms$NdkCxxToolchainPaths.getSysroot(NdkCxxPlatforms.java:989)
at com.facebook.buck.android.NdkCxxPlatforms.getCommonIncludes(NdkCxxPlatforms.java:750)
at com.facebook.buck.android.NdkCxxPlatforms.getCPreprocessorFlags(NdkCxxPlatforms.java:778)
at com.facebook.buck.android.NdkCxxPlatforms.build(NdkCxxPlatforms.java:484)
at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:291)
at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:256)
at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:233)
at com.facebook.buck.android.toolchain.impl.NdkCxxPlatformsProviderFactory.create(NdkCxxPlatformsProviderFactory.java:51)
at com.facebook.buck.rules.AbstractKnownBuildRuleTypes.createInstance(AbstractKnownBuildRuleTypes.java:270)
at com.facebook.buck.rules.AbstractDefaultKnownBuildRuleTypesFactory.create(AbstractDefaultKnownBuildRuleTypesFactory.java:47)
at com.facebook.buck.rules.DefaultKnownBuildRuleTypesFactory.create(DefaultKnownBuildRuleTypesFactory.java:19)
at com.facebook.buck.rules.AbstractKnownBuildRuleTypesProvider$1.load(AbstractKnownBuildRuleTypesProvider.java:46)
at com.facebook.buck.rules.AbstractKnownBuildRuleTypesProvider$1.load(AbstractKnownBuildRuleTypesProvider.java:42)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
... 25 more
NDK r16 requires other configuration changes, too. You can try this fix.
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
I'm building an app that uses GAE using this tutorial and I'm trying to generate a Cloud end point library for a class as explained here.
However, I'm getting an unexpected error. Here are the details:
eclipse.buildId=v22.6.2-1085508
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IN
Framework arguments: -product com.android.ide.eclipse.adt.package.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product com.android.ide.eclipse.adt.package.product
Error
Thu Jun 05 20:24:00 IST 2014
Unexpected Exception
java.lang.reflect.InvocationTargetException
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApi Action.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.google.api.server.spi.tools.ClientLibGenerator$Language
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.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:113)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
... 1 more
Root exception:
java.lang.ClassNotFoundException: com.google.api.server.spi.tools.ClientLibGenerator$Language
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.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createClientLibFromApiConfig(SwarmApiCreator.java:113)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:258)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:444)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Eclipse version I'm using is 4.3.
I am facing the same problem. But, I have found this link and I think it can help:
http://mall.51zks.com/Problem/index/-190279264/generating-the-api-metadata-for-cloud-endpoints-classes-failed/
It basically links forward to this link, which tells how to create the endpoint library using command line too:
https://developers.google.com/appengine/docs/java/endpoints/endpoints_tool
I am working on this solution now. If I get any good news, I will update.
As described in Google bugtracker this is a known bug, you must either downgrade to 1.9.3 or upgrade plugin tools to 3.6.0
see: https://code.google.com/p/google-plugin-for-eclipse/issues/detail?id=278
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.