Android Studio 2.2.2.0 on Mac does not start - android-studio

I am having problems with all of the 2.2.x versions of Android Studio on my Mac. I have downloaded the 2.2.2.0, and when I run the app, I can see the icon comes up in the Dock briefly, and then goes away.
OS X:
Yosemite (10.10.5)
System Java:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
Note: This is the ONLY JRE I have on my system
Console Error:
10/22/16 11:03:21.548 AM studio[953]: allVms required 1.8*,1.8+
10/22/16 11:03:21.552 AM studio[953]: Cannot load JVM bundle: Error Domain=NSCocoaErrorDomain Code=3585 "The bundle “OpenJDK 8” couldn’t be loaded because it doesn’t contain a version for the current architecture." (dlopen_preflight(/Applications/Android Studio.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib): no suitable image found. Did find:
/Applications/Android Studio.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture) UserInfo=0x7f845610 {NSLocalizedRecoverySuggestion=Try installing a universal version of the bundle., NSFilePath=/Applications/Android Studio.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib, NSLocalizedFailureReason=The bundle doesn’t contain a version for the current architecture., NSLocalizedDescription=The bundle “OpenJDK 8” couldn’t be loaded because it doesn’t contain a version for the current architecture., NSDebugDescription=dlopen_preflight(/Applications/Android Studio.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib): no suitable image found. Did find:
/Applications/Android Studio.app/Contents/jre/jdk/Contents/MacOS/libjli.dylib: mach-o, but wrong architecture, NSBundlePath=/Applications/Android Studio.app/Contents/jre/jdk}
Any suggestions would be greatly appreciated, as I've been trying to figure this out for quite some time.

Try install Java SE 1.8
Add JAVA_HOME to PATH in mac
$ touch .bash_profile
In bash_profile, add
export JAVA_HOME=`/usr/libexec/java_home`
$ echo $JAVA_HOME
You will see something like
/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home

Since Android Studio v2.2 (AS) uses its own bundled OpenJDK 8, any other installed JDKs are not the issue. The solution is to install AS (either dragging from the mounted DMG or unzipping) anywhere except the Applications folder.
For whatever reason, when AS resides in Applications, it raises the error posted in the question. I would be very interested to know the reason, but after wasting countless hours, I am simply relieved it is running.

Related

OpenJDK 9 IntelliJ IDEA (Ubuntu) "Can't resolve Symbol"

I recently installed openJDK 9 under Ubuntu 17.10 and it seems like IntelliJ IDEA has trouble with it.
Whenever I create a new project IntelliJ can find the JDK, but it seems like it's not configuring it the right way. Here is how it looks like
when I create a HelloWorld.java example it looks like this
and it says 'Can't resolve symbol 'String''.
Everything works fine when I compile via terminal and even with Eclipse.
When I type 'java --version' it says
openjdk 9-Ubuntu
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)
Is there a way to fix this problem?
The problem is related to Debian packaging of openjdk-9 in the lib/jrt-fs.jar file. This file is compiled incorrectly.
This bug is reported here and there is a more complete Answer here.
If you insist to make use of openjdk you might wait for the new versions or try to build it from the source using the recommended options on the launchpad.

Haxe 3.4.0 installer used 'haxelib version' still reflects 3.3.0

I wanted to use Visual Studio Code for HaxeFlixel development and the Haxe extension noted that I needed Haxe 3.4.0. I went ahead and downloaded the new installer from the website and installed it on my laptop running Windows 10. However after installing it turned out that calling 'haxelib version' in the command prompt it still returned 3.3.0.
I tried rebooting. Uninstalling then rebooting and installing again. I could find nothing in the system environmental variables that could cause it. Tried updating the Haxe on my Desktop, and had the same issue. Which is running windows 8.1 on it.
Does someone know what might be the cause? Thank you for your time in advance.
To check the Haxe version, use haxe -version. haxelib is a separate application and can have a version number that's different from the compiler's version.
Haxelib 3.3.0 appears to be the version shipped with Haxe 3.4.0-rc.1.

android studio device monitor error "Java has started but returned exit code = 13"

When i start android device monitor in android studio "Java has started but returned exit code = 13" error with java path files is displayed.
I am using "android studio (beta)0.89"
I fixed this problem on my Windows 7 computer by installing the 64 bit version of Java 8. I did not have to uninstall or downgrade Java.
Be careful when downloading the Java installation. According to this FAQ, you will probably end up with 32 bit if you use the default installation.
Manually select the 'Windows Offline (64-bit)' version here, rather than letting the Java website choose for you.
This has happened to me just now after installing the latest Java version (v8) which for some reason only comes with 32-bit support while my PC is 64-bit.
I fixed the issue by uninstalling the version 8 of Java which automatically downgraded to Java 7 and it works fine.
I have been able to fix this issue by uninstalling the 32-bit Java 8 version I had, and then installing the latest 64-bit Java 8 version instead. (I didn't have to downgrade)
I think you are trying to open the wrong version of the monitor.exe it might have been changed during an upgrade. Under sdk/tools/lib there should be both the 32 and 64 bit versions under the "monitor-x86 or _64" folder. try either one if it works good. If you want to download the 64bit java version you must use a 64 bit browser. example in IExplorer 11 + you can change it back to 32 bit and back to 64 bit when needed. I did try the java upgrade before and was still getting the java error.
Install both 32 and 64 bit of Java 8. That fixed it for me.
Follow the path provided in the error pop-up. Add the java path in the eclipse.ini file located in the monitor folder in android studio.
Add : -vm
C:\Program Files\Java\jre7\bin\java.exe(Path to your current java file)
Before: -vmargs
If you are running win8.X just go to control panel and uninstall the java 8 version and after everything works fine.
I ran into this issue, even though I had the latest x64 build of the Java 8 JDK installed and set to the JAVA_HOME environment variable.
For me at least, the first line of the error popup shows that it is using Oracle's symlink at C:\ProgramData\Oracle\Java\javapath to find the correct location of javaw.exe. In my case, this was actually pointing to the x86 build of the same version of the JRE, which I also had installed for some reason.
I ended up cleaning house and uninstalling all versions of JRE/JDK, and then reinstalling the latest x64 JDK. This realigned the symlinks, and now it's running smoothly.
Most of the other answers should help resolve this same problem, but for diagnostic purposes if you do have the x64 version installed already, it will probably help to check C:\ProgramData\Oracle\Java\javapath.
[SOLUTION]
Go to following file in your android SDK
Sdk\tools\lib\monitor-x86_64\monitor.ini
and add following line, you might have to change the path to your java
-vm C:\Program Files\Java\jre7\bin\java.exe
just before "-vmargs "
Found solution:
Uninstall Java 8 Update (64-bit)
Install Java 7 Update 71 (64 bit)
I also downgraded JDK from 8 to 7, but it might be not required

32-bit linux based eclipse giving error on startup in Fedora 12

I downloaded the 32-bit eclipse for my 32-bit fedora 12. I extracted the tar.gz without any error. But when i click on the eclipse executable, i am getting the error:
"Failed to load the JNI shared library "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so"
"
I am not able to resolve this error. Please inform how to proceed.
Regards,
Go to your eclipse folder
Open eclipse.ini file and check if there is -vm option set properly
Else set -vm in one line followed by your jdk installed bin folder.
Hope this helps yo solve your problem.
I'd suggest avoiding OpenJDK, as Eclipse will keep complaining about it.
So, navigate to http://java.com/en/download/manual.jsp and download appropriate Sun's Java package (32 or 64 bit, depending on your current installation). As Fedora uses RPMs for package management, I advise to use that method.
Then, after installation, run java -version in terminal, you should get something like:
$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

How do I uninstall Java ME SDK from Windows 7 x64?

I try to uninstall Java ME SDK from Windows 7 x64, but it doesn't work for me.
If I choose Uninstall I get a progress bar, then it goes away, but the Software is still there.
On the first few times I did this, I got the same error message as in I need help UNINSTALLING Java ME SDK:
... show message dialog
title: Critical Error
message: Cannot load native library from path: native/jmesdk/windows/windows-x86.dll
Exception:
java.lang.UnsatisfiedLinkError:
C:\Users\Jonas\AppData\Local\Temp\nbi-8367277139934329064.tmp: Can't load IA 32-bit .dll on a AMD 64-bit platform
In ref to getting the uninstaller to use the 32-bit JRE, the config I attempted that failed to work:
a) Set the PATH environmental variable to point to the 32-bit JRE
b) Windows registry edits in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6 to point to the 32-bit JRE.
In a last ditch effort I renamed \Program Files\Java to Java2, and the uninstaller must have searched to find \Program Files (x86)\Java, the 32-bit JRE, and the uninstall worked.
Seriously, Sun/Oracle. Test your products.
I had the exact same problem and I figured it out. :)
It's because you have the 64-bit JRE installed. Either uninstall it or somehow redirect the J2ME uninstaller to use the 32-bit JRE on your system, so that the 32-bit uninstaller can run instead of the 64-bit uninstaller.
I had the same problem and figured the solution out. As mentioned above you need to make sure J2ME unnistaller only recognizes Java x86. The simplest way I found, instead of unnistalling Java x64, you only have to temporarily rename your Java x64 installation folder to anything you want. That is, rename the folder C:\Program Files\Java to, e.g, C:\Program Files\JavaTEMP.
Now run unnistaller. When finished rename the folder back it's previous name.
That's all.
Hope I helped.
Just perform the following steps and you will be done:
1) Click on the link below and click on any of the ...i586.exe link according to your system
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
2)Install the software without changing default settings.
3)Run cmd command and type the following:
C:\Java_ME_platform_SDK_3.0\uninstall.exe --javahome "C:\Program Files (x86)\Java\jre8"
4)[optional] uninstall java 8 from control panel which you downloaded to uninstall the above software.
Congratulations.. You just did it!!
Thank you for reading.. Any suggestions or aprreciation is welcomed..
Turns out I had exactly the same problem, uninstall java (TM) 7 64bit and locate the 32-bit java installer bone this download uninstall it and try to install the Sun Java Wireless Toolkit and uninstalled correctly.
Just run this command:
C:\Java_ME_platform_SDK_3.0\uninstall.exe --javahome "32-bit jre location"
Rather than temporarily moving the x64 JRE out of the way, just tell the J2ME SDK uninstaller to use the 32bit JRE:
C:\Java_ME_platform_SDK_3.0\uninstall.exe --javahome "C:\Program Files (x86)\Java\jre7"
Note that this provides the path to a JRE within the "Program Files (x86)" directory, which is the 32bit variant. I only had a Java 7 JRE, but this ought to work with a Java 6 JRE, also.

Resources