Reputation: 899
I have been trying to set up Titanium and Android for 3 days. Still I am stuck with an issue. I am getting this Java related error. I have seen the discussions and forum for this error. I followed all their trials. Still I am unable to make it work. Through command prompt test I can say like path is proper for Java. Even JAVA_HOME
variable shows proper path.
I have tried the environmental variables by setting JAVA_HOME
value to:
C:\PROGRA~1\Java\jdk1.7.0
and set PATH
value to
C:\PROGRA~1\Java\jdk1.7.0\bin
I can run and compile a sample file Hello.java
using command prompt, but still I get this error in Titanium IDE :
[ERROR] Required jarsigner not found<br>
[ERROR] Required javac not found<br>
[ERROR] Required java not found<br>
[ERROR] One or more required files not found - please check your JAVA_HOME environment variable
please help me guys...
Thanks in Advance.
GANESH M
Upvotes: 1
Views: 4132
Reputation: 21
allright, for all those who never managed to make it work even after trying everything you've read. I'm running Win7 x64.
Here are the exact steps I've followed (plus something else I've discovered - step B):
A)
Grabbed the zip version of android sdk (maybe it would have also worked with the installer, I've just grabbed the zip because I've read there may be problems with the installer - but i think those problems were just because of the incorect environment variable Path to Java). Anyway, zip or installer, in order to make the next step work (in order for titanium to recocnize the android sdk) you need to download/install theese packages (in the SDK Manager.exe of the android sdk) : a) The "Tools" section; b) Android 2.1 and Android 2.2 (api 7 & 8) - maybe just one of them is mandatory, but I just didn't have the patience to check which one after so much time spent fot getting everything to work; c) from the "Extras" section I've installed everything, although I've read that "Google USB" and "Android support" are enough. d) install every other package you want (you don't have to develop for 2.1 or 2.2 only, it's just that they are mandatory to have installed in order for titanium to aknowledge the sdk - if you ask me, it's a bug).
P.S. I've installed the android sdk in C:\android-sdk - a path with no spaces (ie. Program Files (x86))
in Titanium studio preferences, I've set Android SDK Home to C:\andoird-sdk
B)
NOW...
After following all the steps above, after creating my first android app, when I've tried to run it I got the followind errors:
So... From the Titanium SDK (mine is at C:\Users\ MyUserName \AppData\Roaming\Titanium) I've opened mobilesdk\win32\2.0.1.GA2\android\builder.py And went to the def set_java_commands(self) block (mine started at line 268).
I've replaced the string value ("Required jarsigner not found") in one of the errors there with home_jarsigner so now in titanium console, when trying to run the app, I got : C:\Progra~1\Java\jdk1.6.0_31\bin\bin so i've noticed that the os.path.join function adds bin TWICE to the path... HECK IF I KNOW WHY !
In order to fix this, I've changed the following lines by removing "bin" from the path concatenation :
~~~
line 274: home_jarsigner = os.path.join(os.environ["JAVA_HOME"], "bin", "jarsigner.exe")
line 275: home_javac = os.path.join(os.environ["JAVA_HOME"], "bin", "javac.exe")
line 276: home_java = os.path.join(os.environ["JAVA_HOME"], "bin", "java.exe")
~~~
Just removed "bin", from those lines and then everything was fine, my android app launched and i was finally SO SO HAPPY after TWO days of knocking my head against the wall.
Upvotes: 2
Reputation: 29658
Titanium on 64-bit Windows requires the 32-bit version of the Java SDK. Make sure the 32-bit path is set in your JAVA_HOME
environment variable.
Upvotes: 0
Reputation: 36
I was able to fix this issue on Window 7 with these steps:
Upvotes: 2