Windows 7 Java + Android issues

You must Login before you can answer or comment on any questions.

This isn't a question so much as an answer. I was having serious difficulty getting Titanium Studio and Android set up on Windows.

I would repeatedly get the following errors when I attempted to build the Hello World project: Required java not found

Required javac not found

Required jarsigner not found

I had been playing with my Path and JAVA_HOME variables, and nothing seemed to be working. I was able to locate java and javac using the command prompt, but Titanium Studio just wouldn't figure it out. I finally discovered that the new settings were not taking effect even after shutting down and restarting Titanium Studio.

When setting new Path and JAVA_HOME variables in Windows 7, I had to Log Out and Log In to windows to get them to take effect within Titanium Studio. (Typing 'echo $PATH' at the terminal window would not update until after Logging Out of windows)

These are the system variables that worked for me:

android_sdk - deleted. Titanium Studio will not find the sdk if this system variable is present.

JAVA_HOME: C:\Program Files (x86)\Java\jdk1.6.0_xx

Path: ...;C:\Program Files (x86)\Java\jdk1.6.0_xx\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Android\android-sdk\platform-tools

— asked 1 year ago by AMI Entertainment Network
2 Comments
  • I had to add the android sdk directory to the path as well

    C:\Program Files (x86)\Android\android-sdk\

    — commented 11 months ago by Gerald Gannod

  • I am on windows 7 and have been searching an answer to this problem for 2 days now going through these proposed solutions. This is the solution that worked for me.

    THANK YOU!!!

    — commented 8 months ago by Guy Clark

2 Answers

This is not an answer but thanks. Not that it has solved my problem but thank you for letting me know that other people have problems.

Unfortunately, I have yet to get as far as you managed as I cannot get Titanium Studio to recognise the Android SDK Directory. I have installed, un-installed and re-installed the Android SDK a number of times and into different folders but to no avail. After reading your notes above I have now installed it in the default directory and set up the environmental variables as you suggested. Still no luck. To set up the Android SDK Directory I browse to 'C:\Program Files (x86)\Android\android-sdk' and straight away get the message that it cannot find the SDK in that directory. I then noticed that the Titanium SDK Directory had a '\' at the end to show it was a directory. I therefore added one to the Android SDK Directory making it 'C:\Program Files (x86)\Android\android-sdk\' and the message stayed there. I clicked the drop-down box to select the Default Android SDK (nothing there of course) and the message disappeared. I then clicked it again and there was still nothing there.

I have been struggling with this for over two weeks now. Surely it should be more simple than this.

Installing the Andoird SDK is also a stuggle. It gets part way though and says that a directory is locked by another process. To close all other programs down and turn off my security program. Nothing else is running and turning off my security program does not help. The problem is the Android SDK install program that is locking the folder itself. Reboot and I could continue with the installation. Not once though, three or four times to get everything I wanted installed. Thankfully I only wanted two API's plus the tools and extras. I would be grateful if anyone had any ideas about fixing the problems I am having.

— answered 1 year ago by John Horton
answer permalink
2 Comments
  • I also had some problems getting Titanium Studio to recognize the android sdk. After some research, I found out that you have to the the Google API's for each version (1.6 - 2.3.3), and they aren't installed by default. I kept trying to install them using the SDK Manager but they were failing with a 'Permission Denied' error message. The magic touch was to make sure to hit 'Agree All' after you press the 'Install Packages...' button - that wasn't immediately apparent as the cause of the failure.

    — commented 1 year ago by AMI Entertainment Network

  • Path in system or user variables?

    — commented 1 year ago by Aleksa Savic

I was able to fix this issue on Window 7 with these steps:

-1. Left click to our “Computer” Icon and click “Properties”.

-2. The window should appear with the Left Hand Side menu saying “Control Panel Home” , we will click the “Advanced System Settings”.

-3. A popup window appears after that, and then we click the button ” Environment Variables “.

-4. Another window appears and it is for Environment Variables, on the appear part of it, there is a list for System Variables . Let’s add variables or update our “path” variable if it is already existing.

-5. Click ”New” to create a variable JAVA_HOME with your java path ej. C:\Java\jdk1.6.0_20

-6. Edit your PATH variable and add at the begining %JAVA_HOME%; without "bin" because in builder.py the word bin is added.

Your Answer

Think you can help? Login to answer this question!