简体   繁体   中英

Android SDK Java: not found

A few days ago I started with Ubuntu for the first time. I want to use Android SDK with Eclipse. I installed everything needed. It only goes wrong when I try to start the Android SDK. There is a proxy server on the internet here, but when I try to insert it at:

Eclipse > Windows > Preference > Android > Launch and then enter the proxy in Default Emulator Options (link: How to set Internet options for Android emulator? )

Each time I start the SDK via Eclipse, I get failed to fetch with... so I found out that I can enter the proxy via the android tool. But when I enter ./android-sdk-linux/tools/android I get some errors:

./android-sdk-linux/tools/android: 84: java: not found ./android-sdk-linux/tools/android 101" java: not found exec: 114: java: not found

I installed the JDK from oracle. I followed the steps and it did install via the terminal. After that I added it to the PATH(maybe I did it wrong here). I tried it with the JRE too. Eclipse gave an error at the begin about java. But when I installed a copy of the JRE in the Eclipse folder, it didn't give an error anymore.

So I think it's my JDK, but I don't know what I did wrong.

I use Ubuntu 11.10. 64bit via VMware Player.

在Ubuntu上我必须进入/ sdk / tools / android并将java_cmd变量更改为等于我的JAVA_HOME路径 - 然后它才有效。

[path from comment] /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home//android-sdk-linux/tools:/home//jdk1.6.0_29

Change the path of your JDK in $PATH to /home/<user_name>/jdk1.6.0_29/bin .

I have the same problem, and fixed it. I'm running Debian based Linux Distribution. And my setting $PATH variable environment didn't work even thought I can run java from Konsol.

Here is another better solution.

Linux Ubuntu Android SDK manager not starting up - android:java: not found

Solution which I mean is, make a symbolic link /usr/bin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM