Reputation: 3207
I just installed and configured Titanium Studio and it's dependencies to develop my Android applications but none of the applications even the sample app of titanium won't start in emulator.
I can see Mobile Web Preview
in browser but when I try Android Emulator
I get the following error in Console:
[INFO] Force including all modules...
[INFO] Compiling Javascript Resources ...
[INFO] Compiling localization files
[ERROR] error: more than one emulator
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR] File "C:\Users\Administrator\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 2528, in <module>
[ERROR] builder.build_and_run(False, avd_id, debugger_host=debugger_host, profiler_host=profiler_host)
[ERROR] File "C:\Users\Administrator\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 2285, in build_and_run
[ERROR] self.push_deploy_json()
[ERROR] File "C:\Users\Administrator\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 1954, in push_deploy_json
[ERROR] sdcard_available = self.wait_for_sdcard()
[ERROR] File "C:\Users\Administrator\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py", line 1907, in wait_for_sdcard
[ERROR] if 'SDCARD READY' in output:
[ERROR] TypeError: argument of type 'NoneType' is not iterable
[ERROR] : Build process exited with code 1
[ERROR] : Project failed to build after 33s 353ms
Android emulator opens up and everything looks find but my application fails to build.
I found this page and did copy the compile command and manually run it like this:
python "c:\Users\Administrator\AppData\Roaming\npm\titanium.CMD" "--no-colors" "--no-prompt" "build" "--platform" "android" "--sdk" "3.1.0.GA" "--log-level" "trace" "--target" "emulator" "--android-sdk" "C:\Users\Administrator\Desktop\adt-bundle-windows-x86_64-20130219\sdk" "--avd-id" "2" "--avd-abi" "armeabi" "--avd-skin" "HVGA" "--skip-js-minify"
but python gives me this error:
File "c:\Users\Administrator\AppData\Roaming\npm\titanium.CMD", line 1
:: Created by npm, please don't edit manually.
^
SyntaxError: invalid syntax
What am I doing wrong? Where is the roblem?
Additional Info:
I'm using latest version of Titanium Studio (build: 3.1.0.201304151600) on my Windows Server 2008 R2;
I have node.js
, npm
, node.acs
, python
installed on my system and environmental variables are correct and working;
I have Android SDK for both android-2.2
and android-17
versions.
Upvotes: 3
Views: 8670
Reputation: 569
Seems build tools got moved to another directory with the latest Android SDK update. Created symlinks to aapt and dx in /Applications/Android-sdk/platform-tools:
ln -s /Applications/Android-sdk/build-tools/17.0.0/aapt aapt ln -s /Applications/Android-sdk/build-tools/17.0.0/dx dx
This solved it for me (after some digging in their Python code).
I'm on windows so i used mklink. I had to add a link to lib/dx.jar for it to work. What I dit was first add folder 'lib' to platform-tools folder and after in command line:
cd %YOUR_ANDROID_DIR%\platform-tools
mklink aapt.exe ..\build-tools\android-4.2.2\aapt.exe
mklink dx.bat ..\build-tools\android-4.2.2\dx.bat
cd lib
mklink dx.bat ..\..\build-tools\android-4.2.2\lib\dx.jar
I copied the following files:
C:\Android\build-tools\17.0.0\aapt.exe to C:\Android\platform-tools\aapt.exe
C:\Android\build-tools\17.0.0\dx.bat to C:\Android\platform-tools\dx.bat
C:\Android\build-tools\17.0.0\lib to C:\Android\platform-tools\lib
I then cleaned the project and rebuilt and everything is now working.
Upvotes: 2
Reputation: 3207
After hours of searching and seeking through too many similar problems without answers, I fixed it by myself.
For everyone who is facing errors starting with [ERROR] error: more than one emulator
in Titanium Studio, the problem can be because of one of the following reasons:
My error was because of BlueStacks running in background.
Upvotes: 3
Reputation: 23622
Though it should be a comment, thought of answering it.
If these does not work, try to...
Upvotes: 1