Project: titanium
Issue TIMOB-17281: CLI: fails to build to device with Android 5.0
After installing the preview of the new Android version "L" to my Nexus, the Titanium CLI fails to build apps. It works fine if I build with Titanium Studio. I know that this may be fixed automatically when L releases with an actual version number. But is there a way to fix it or work around at the moment? *Steps to reproduce* 1. create new default App (Classic or Alloy) 2. build from CLI with {{--target device}} to device with L installed *Result* creates the following error {code:bash} TiNy cooked: ti build --platform android --sdk 3.3.0.Beta build --target device --shadow Titanium Command-Line Interface, CLI version 3.3.0-rc, Titanium SDK version 3.3.0.Beta Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ [INFO] Auto selecting device that closest matches 4.4.2 /usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185 throw e; ^ TypeError: Invalid Version: L.0.0 at new SemVer (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/node-appc/node_modules/semver/semver.js:271:11) at compare (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/node-appc/node_modules/semver/semver.js:424:10) at Function.gte (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/node-appc/node_modules/semver/semver.js:473:10) at Object.gte (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/node-appc/lib/version.js:90:16) at AndroidBuilder.validate (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/android/cli/commands/_build.js:1222:22) at exports.validatePlatformOptions (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/titanium-sdk/lib/titanium.js:596:69) at /Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/cli/commands/build.js:194:19 at callCommandValidate (/usr/local/lib/node_modules/titanium/lib/cli.js:850:7) at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:551:21 at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:227:13 --------------------------------------------- at Object.run (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/node-appc/lib/subprocess.js:59:8) at /Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/titanium-sdk/lib/emulators/genymotion.js:319:21 at /Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/async/lib/async.js:511:21 at /Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/async/lib/async.js:227:13 at /Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/async/lib/async.js:111:13 at Array.forEach (native) at _each (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/async/lib/async.js:32:24) at async.each (/Users/manu/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.Beta/node_modules/async/lib/async.js:110:9) {code} *Expected result* It should build the app and install it on the device
Story points: 8