blunders
blunders

Reputation: 3669

Error running Android emulator from Titanium Studio

Basically trying to get the default sample project (which is linked to here) to run in the Android simulator.

(I'm on Windows XP-SP3, see the "Diagnostics Log" output in the question's footer for more config info, if you have any questions about configs let me know.)

Here's what I've done so far:

What do I need to do to get KitchenSink to run in the Android Simulator? Is there a way to just run the Android Simulator to confirm it's working on it's own?


Here's the full output from the "Diagnostics Log" under the help tab:


Per the suggestion below, I created a new mobile project targeting Android, and then ran the project using the "Run As..." Android emulator option. The system returned this messages: "[INFO] [2012-04-24 17:03:33,140] Serving up files for com.test.test at 0.0.0.0:1133 from C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test"

build.log Output: C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test\build.log

Logfile initialized
[INFO] logfile = C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test\build.log
[DEBUG] C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2\android\builder.py simulator test C:\Program Files\Android\android-sdk C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test com.test.test 1 HVGA
[INFO] logfile = C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test\build.log
[DEBUG] C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2\android\builder.py emulator test C:\Program Files\Android\android-sdk C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test com.test.test 1 HVGA
[ERROR] Error locating JDK: set $JAVA_HOME or put javac and jarsigner on your $PATH
[ERROR] Error locating JDK: set $JAVA_HOME or put javac and jarsigner on your $PATH

**Windows commands (java,javac,jarsigner) all return valid responses, which appears to conflict with the build.log file saying the JDK is not in the file path. The path is currently set as:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;"C:\Program Files\Java\jdk1.6.0_31\bin"

UPDATE:

Logfile initialized
[INFO] logfile = C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test3\build.log
[DEBUG] C:\Documents and Settings\user\Application Data\Titanium\mobilesdk\win32\2.0.1.GA2\android\builder.py simulator test3 C:\Program Files\Android\android-sdk C:\Documents and Settings\user\My Documents\Titanium Studio Workspace\test3 com.tester.test3 1 HVGA
[INFO] Building test3 for Android ... one moment
[ERROR] JDK version 'javac' is not recognized as an internal or external command,

operable program or batch file. detected, but 1.6 is required

Upvotes: 1

Views: 13748

Answers (2)

Simon McLoughlin
Simon McLoughlin

Reputation: 8465

Step one to see is ur config ok, create a new project and run that, it should have a default app.js page with 2 tabs on it, if that doesn't work its a config issue

if that fails try following the steps here for setting up titanium: http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Setting_up_Titanium_Studio-section-30086257_SettingupTitaniumStudio-SoftwareLocations

Or here for setting up environment variables: http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Software_Locations_and_Environment_Variables

Upvotes: 2

Xuntar
Xuntar

Reputation: 2280

Your system environment variables are not set correctly. Try to set them like this:

android_sdk : C:\Android\android-sdk
JAVA_HOME : C:\Program Files\Java\jdk1.6.0_31
PATH : %JAVA_HOME%\bin;%android_sdk%;C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools

In Control Panel -> System -> (On Windows 7: Advanced system settings ->) Advanced tab -> Environment Variables Create 2 new variables with the names "android_sdk" and "JAVA_HOME" with the right values. After that change your system PATH variable and add the line I've pasted here. (Also try not to use spaces in your android_sdk path, just as a precaution)

Upvotes: 1

Related Questions