3

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.

Community
  • 1
  • 1
Michielodc
  • 743
  • 2
  • 8
  • 11
  • @Kimi /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home//android-sdk-linux/tools:/home//jdk1.6.0_29 – Michielodc Nov 24 '11 at 13:00

3 Answers3

5

On Ubuntu I had to go into the /sdk/tools/android and change the java_cmd variable to equal my JAVA_HOME path - then it worked.

Brad Stephens
  • 51
  • 1
  • 2
4

[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.

Kimi
  • 6,239
  • 5
  • 32
  • 49
  • 1
    I did **export PATH:$PATH:/home//jdk1.6.0_29/bin** but it said **not a valid identifier** – Michielodc Nov 24 '11 at 13:20
  • That's because you missed the identifier: export PATH=$PATH:/home/... (use `=` instead of `:` after `export PATH`) – Kimi Nov 24 '11 at 13:35
  • 1
    thx for your help. I had the PATH wrong. It doesnt give an error now. Just some things and some fails. Now I have to setup the proxy right :/ – Michielodc Nov 24 '11 at 13:41
0

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

Community
  • 1
  • 1
azwar_akbar
  • 1,451
  • 18
  • 27