Android Studio Doesn't Start on Ubuntu - android

I started using Android Studio after a couple of days, Suddenly Android Studio didn't start . When I started it through terminal i.e "Studio" Command. Got the Following Error.
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Start Failed: Internal Error. Please report to https://https://code.google.com/p/android/issues
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:103)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk1.8.0_91/jre/lib/i386/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:97)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
... 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:593)
at com.intellij.idea.Main.showMessage(Main.java:336)
at com.intellij.idea.Main.showMessage(Main.java:312)
at com.intellij.idea.Main.showMessage(Main.java:291)
at com.intellij.idea.Main.main(Main.java:106)
I have re-installed java 7 and java 8 both . Also Reinstalled Android Studio. But still there was no help.
I had installed octave before, was that a problem?

To resolve the problem you should install JDK 64bit. From the comments, you have installed 32-bit JDK

I was having the same issue. I killed the app and reopened. It fixed the issue for me.

Related

Update Android Studio from 3.6 to 4.0 fails with error

The update to Android Studio 4.0 gives me the following error on Windows 10:
Internal error. Please refer to https://code.google.com/p/android/issues
com.intellij.ide.plugins.MainRunner$StartupAbortedException: java.lang.reflect.InvocationTargetException at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: 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.plugins.MainRunner.lambda$start$0(MainRunner.java:58)
... 1 more
Caused by: java.lang.NoClassDefFoundError: io/netty/channel/ChannelHandler at com.intellij.idea.StartupUtil.lockSystemFolders(StartupUtil.java:478) at com.intellij.idea.StartupUtil.lockDirsAndConfigureLogger(StartupUtil.java:252) at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:184) at com.intellij.idea.MainImpl.start(MainImpl.java:16)
... 6 more
Caused by: java.lang.ClassNotFoundException: io.netty.channel.ChannelHandler at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:282) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 10 more
JRE 1.8.0_212-release-1586-b04 amd64 by JetBrains s.r.o
C:\Program Files\Android\Android Studio\jre\jre"
https://code.google.com/p/android/issues does not open.
Any idea to fix it?
I have this problem in the android studio in Linux OS after installing a plugin, I resolved this issue with deleted.AndroidStudio4.0 folder from Home Directory and other ways you can go to this directory and delete the last installed plugin that caused it.
Directory : /home/your system's name/.AndroidStudio4.0/config/plugins .
and for Windows
Directory : C:\Users\your system's name.AndroidStudioPreview4.0\config\plugins
Note: this directory is hidden and you must visible before use it.

Unity: Failed to build apk

So I've tried everything I could find. It keeps showing the below. I tried replacing the tool folder (C:/Users/(My user name)/AppData/Local/Android/Sdk with a lower version. I tried replacing the entire sdk. I tried uninstalling then re-installing android studios. I really don't know what else to do. Kinda disappointing that I finally finished making an original minigame but can't build it. I've been struggling with this for the past 12 hours sigh. Thanks for your time!
Error building Player: CommandInvokationFailure: Failed to build apk. See the Console for details.
C:/Program Files/Java/jdk-9.0.1\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/dlma1/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Programming\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at SDKMain.main(SDKMain.java:129)
Caused by: java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
at com.android.sdklib.internal.build.SignedJarBuilder.<init>(SignedJarBuilder.java:177)
at com.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:422)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:362)
at UnityApkBuilder.<init>(UnityApkBuilder.java:212)
at UnityApkBuilder.main(UnityApkBuilder.java:34)
... 5 more
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 11 more
]
stdout[
]
According to this answer it appears that...
Java 9 removed the sun/misc/BASE64Encoder class.
A workaround is to downgrade to Java 8.

Error while going into designer layout for android aplication using vs2015

I have created a android application in visual studio 2015
when i go into layout and open Main.axml
I will get the following error.
Sometimes this error
java.lang.UnsatisfiedLinkError: C:\Users\Strangers_Call\AppData\Local\Temp\AndroidDesigner3364567969202547439.dll:
Can't load AMD 64-bit .dll on a IA 32-bit platform
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 mono.android.JniHelper.loadEmbeddedJniLibrary(JniHelper.java:28)
at mono.android.D3DImageFactory.<clinit>(D3DImageFactory.java:14)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at mono.android.DesignerSession.initializePlatformSpecific(DesignerSession.java:86)
at mono.android.DesignerSession.<init>(DesignerSession.java:75)
at mono.android.Project.createSession(Project.java:382)
at mono.android.Project.processMessage(Project.java:414)
at mono.android.MessageListener.executeMessage(MessageListener.java:88)
at mono.android.MessageListener$Runner.run(MessageListener.java:44)
at java.lang.Thread.run(Thread.java:748)
And sometimes this one
java.lang.UnsatisfiedLinkError: C:\Users\Strangers_Call\AppData\Local\Temp\AndroidDesigner3364567969202547439.dll:
Can't load AMD 64-bit .dll on a IA 32-bit platform
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 mono.android.JniHelper.loadEmbeddedJniLibrary(JniHelper.java:28)
at mono.android.D3DImageFactory.<clinit>(D3DImageFactory.java:14)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at mono.android.DesignerSession.initializePlatformSpecific(DesignerSession.java:86)
at mono.android.DesignerSession.<init>(DesignerSession.java:75)
at mono.android.Project.createSession(Project.java:382)
at mono.android.Project.processMessage(Project.java:414)
at mono.android.MessageListener.executeMessage(MessageListener.java:88)
at mono.android.MessageListener$Runner.run(MessageListener.java:44)
at java.lang.Thread.run(Thread.java:748)
can anyone tell me how to resolve this issue??
UnsatisfiedLinkError is thrown if the Java Virtual Machine cannot find
an appropriate native-language definition of a method declared native.
C:\Users\Strangers_Call\AppData\Local\Temp\AndroidDesigner3364567969202547439.dll file in your case appears to be 64-bit whereas your system runs on 32-bit. Hence, the system can not load this file and you are getting the error.

Fedora - android studio is not running

I want to run android studio in fedora 25.
I run ./studio.sh
and I get this error:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m;support was removed in 8.0
No protocol specified
Start Failed: Internal Error. Failed to initialize graphics environment
java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:1043)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361)
at javax.swing.text.StyleContext.reclaim(StyleContext.java:454)
at javax.swing.text.StyleContext.addAttribute(StyleContext.java:311)
at javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:578)
at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1501)
at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1312)
at javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:1259)
at javax.swing.text.StyleContext.addStyle(StyleContext.java:107)
at javax.swing.text.StyleContext.<init>(StyleContext.java:87)
at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:166)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:391)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:98)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:73)
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:113)
any idea how to fix this problem? I tried to unset Display or export Display:=0 and I did not get any solution
Fedora 25 is not using XOrg anymore by default. We moved to Wayland and Java probably does not handle that. It would be nice to report the problem to Android Studio developers (not here).
Anyway, you can workaround it by running Fedora using old X. Select the "GNOME on XOrg when logging into your account:
I got the below issue because of running as a root user. Once I exit from the root user and tried ./studio.sh it worked perfectly :)
Start Failed: Internal Error. Failed to initialize graphics environment
I got this issue because I was running as root user. This will work fine if you don't change your privilege to the super user

when installing Android Studio in ubuntu 15,run studio.sh,but it report "cannot open shared object file"

I install an Android develop environment in ubuntu15,after installing JDK,and SDK tools,run studio.sh,it reports some error info:
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Start Failed: Internal Error. Please report to https://code.google.com/p/android/issues
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:497)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:92)
Caused by: java.lang.UnsatisfiedLinkError: /home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so: libXtst.so.6:
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:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
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:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1842)
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:96)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:72)
... 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:593)
at com.intellij.idea.Main.showMessage(Main.java:248)
at com.intellij.idea.Main.showMessage(Main.java:234)
at com.intellij.idea.Main.showMessage(Main.java:224)
at com.intellij.idea.Main.main(Main.java:95)
but libawt_xawt.so, libXtst.so.6 have existed,PATH has been set
$ locate libawt_xawt.so
/home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so
$ locate libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
$ echo$PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/xhk/java/jdk1.8.0_60/bin:/home/xhk/java/jdk1.8.0_60/jre/bin:/home/xhk/android/android-sdk-linux:/home/xhk/android/android-sdk-linux/tools:/home/xhk/android/android-sdk-linux/platform-tools
How can i fix it? o.0
You seem to have installed the 32 bit version of the java SDK as indicated by this line:
/home/xhk/java/jdk1.8.0_60/jre/lib/i386/libawt_xawt.so
But your system is a 64 bit system as indicated by these lines
/usr/lib/x86_64-linux-gnu/libXtst.so.6
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
There are two solutions. The first is to install the 64 bit version of the java jdk. The second is to install the 32 bit version of the libXtst
sudo apt-get install libxtst6:i386
I would prefer the first option

Categories

Resources