Project: titanium
Issue TIMOB-15718: Android: NPE when running Android app in a distribution or debug version
Using Titanium Studio, build: 3.2.0.201311122225 Titanium SDK 3.2.0, CLI 3.2.0. To reproduce: 1. Create a default mobile project in studio. 2. Run it as a distribution or debug version on device. *Studio log file:* {code} !ENTRY org.eclipse.core.jobs 4 2 2013-11-13 16:39:19.904 !MESSAGE An internal error occurred during: "Android Distribution...". !STACK 0 java.lang.NullPointerException com.appcelerator.titanium.android.core.AndroidSDKEntity.getSDKPath(AndroidSDKEntity.java:179) com.appcelerator.titanium.android.core.launching.AndroidNodeJSCommandsHelper.getPackageProjectArguments(AndroidNodeJSCommandsHelper.java:477) com.appcelerator.titanium.core.internal.cli.NodeTitaniumSDKCommandsHandler.packageProject(NodeTitaniumSDKCommandsHandler.java:416) com.appcelerator.titanium.core.internal.cli.LegacyTitaniumSDKCommandsHandler.packageProject(LegacyTitaniumSDKCommandsHandler.java:606) com.appcelerator.titanium.android.core.launching.AndroidLaunchConfigurationUtil.runAndroidPackagingProcess(AndroidLaunchConfigurationUtil.java:136) com.appcelerator.titanium.android.core.launching.AndroidPackagerLaunchConfigurationDelegate$1.run(AndroidPackagerLaunchConfigurationDelegate.java:108) org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) !ENTRY org.eclipse.core.jobs 4 2 2013-11-14 10:55:38.411 !MESSAGE An internal error occurred during: "Launching Titanium Android Application Installer - timob15018". !STACK 0 java.lang.NullPointerException com.appcelerator.titanium.android.core.AndroidSDKEntity.getSDKPath(AndroidSDKEntity.java:179) com.appcelerator.titanium.android.ui.launching.device.AndroidDebugOnDeviceLaunchConfigurationDelegate.runLogcat(AndroidDebugOnDeviceLaunchConfigurationDelegate.java:277) com.appcelerator.titanium.android.ui.launching.device.AndroidDebugOnDeviceLaunchConfigurationDelegate.launch(AndroidDebugOnDeviceLaunchConfigurationDelegate.java:141) org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858) org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707) org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018) org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222) org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) {code} *Diagnostic test output:* {code} Host OS: Mac OS X OS Version: 10.8.5 OS Arch: x86_64 JRE Version: 1.6.0_37 JRE Vendor: Apple Inc. JRE Home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Titanium Studio Version: 3.2.0.201311122225 Install Directory: file:/Applications/Titanium_Studio/ Workspace Directory: file:/Users/pwang/Documents/Titanium Studio Workspace/ VM Arguments: -Xms128m -Xmx1024m -XX:MaxPermSize=256m -Xverify:none -Declipse.p2.unsignedPolicy=allow -Declipse.log.size.max=10000 -Declipse.log.backup.max=5 -Xdock:icon=../Resources/titanium.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Djava.class.path=/Applications/Titanium_Studio/TitaniumStudio.app/Contents/MacOS//../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar Language: en_US ACS App URL: https://api.cloud.appcelerator.com/v1/apps/create.json?key=7fI2AZHmrSvAHNKsSQKzrSXz5NWjo2tt ACS Login URL: https://api.cloud.appcelerator.com/v1/admins/studio_login.json?key=7fI2AZHmrSvAHNKsSQKzrSXz5NWjo2tt XCode Version: 5.0 Latest Titanium SDK: 3.2.0 Titanium SDK Version: 1.7.3 SDK Modules API Version:null SDK Timestamp: 10/17/11 13:44 SDK Build Number: dcf4257 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/1.7.3 Titanium SDK Version: 1.7.5 SDK Modules API Version:null SDK Timestamp: 11/02/11 17:00 SDK Build Number: ab20af7 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/1.7.5 Titanium SDK Version: 1.8.0.1 SDK Modules API Version:2 SDK Timestamp: 12/22/11 13:09 SDK Build Number: fbdc96f SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1 Titanium SDK Version: 1.8.0.1.RC3 SDK Modules API Version:2 SDK Timestamp: 12/17/11 19:53 SDK Build Number: c903964 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1.RC3 Titanium SDK Version: 1.8.1 SDK Modules API Version:2 SDK Timestamp: 01/27/12 17:31 SDK Build Number: a24502a SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/1.8.1 Titanium SDK Version: 1.8.2 SDK Modules API Version:2 SDK Timestamp: 02/23/12 17:46 SDK Build Number: 59b3a90 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/1.8.2 Titanium SDK Version: 2.0.0 SDK Modules API Version:2 SDK Timestamp: 08/28/12 11:17 SDK Build Number: 2730634 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.0.0 Titanium SDK Version: 2.0.1.GA2 SDK Modules API Version:2 SDK Timestamp: 04/12/12 16:33 SDK Build Number: 999c68a SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2 Titanium SDK Version: 2.0.2.GA SDK Modules API Version:2 SDK Timestamp: 05/30/12 10:21 SDK Build Number: 2ff31a3 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA Titanium SDK Version: 2.0.3 SDK Modules API Version:2 SDK Timestamp: 10/12/12 15:44 SDK Build Number: 413a728 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.0.3 Titanium SDK Version: 2.1.0 SDK Modules API Version:2 SDK Timestamp: 04/10/13 15:50 SDK Build Number: d0e2b37 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.0 Titanium SDK Version: 2.1.0.GA SDK Modules API Version:2 SDK Timestamp: 06/28/12 12:16 SDK Build Number: 6e3cab6 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.0.GA Titanium SDK Version: 2.1.1 SDK Modules API Version:2 SDK Timestamp: 07/23/12 17:34 SDK Build Number: 11e5435 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.1 Titanium SDK Version: 2.1.1.GA SDK Modules API Version:2 SDK Timestamp: 07/27/12 14:01 SDK Build Number: 0fd84a2 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA Titanium SDK Version: 2.1.2 SDK Modules API Version:2 SDK Timestamp: 08/28/12 14:34 SDK Build Number: ed7f777 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.2 Titanium SDK Version: 2.1.2.GA SDK Modules API Version:2 SDK Timestamp: 08/24/12 14:46 SDK Build Number: ed7f777 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.2.GA Titanium SDK Version: 2.1.3 SDK Modules API Version:2 SDK Timestamp: 09/27/12 16:31 SDK Build Number: a770187 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.3 Titanium SDK Version: 2.1.3.GA SDK Modules API Version:2 SDK Timestamp: 10/02/12 16:16 SDK Build Number: 15997d0 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.3.GA Titanium SDK Version: 2.1.4 SDK Modules API Version:2 SDK Timestamp: 10/26/12 16:49 SDK Build Number: 1208dd9 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.4 Titanium SDK Version: 2.1.4.GA SDK Modules API Version:2 SDK Timestamp: 11/09/12 12:46 SDK Build Number: 51f2c64 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.1.4.GA Titanium SDK Version: 2.2.0 SDK Modules API Version:2 SDK Timestamp: 01/07/13 16:46 SDK Build Number: 77023f0 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.2.0 Titanium SDK Version: 2.2.0.1 SDK Modules API Version:2 SDK Timestamp: 09/04/12 09:49 SDK Build Number: 2c0e61d SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/2.2.0.1 Titanium SDK Version: 3.0.0 SDK Modules API Version:2 SDK Timestamp: 12/10/12 17:19 SDK Build Number: b73f165 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.0.0 Titanium SDK Version: 3.0.0.1 SDK Modules API Version:2 SDK Timestamp: 10/02/12 17:30 SDK Build Number: 21ddfc3 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.0.0.1 Titanium SDK Version: 3.0.0.GA SDK Modules API Version:2 SDK Timestamp: 12/12/12 18:49 SDK Build Number: a5894b3 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.0.0.GA Titanium SDK Version: 3.0.1 SDK Modules API Version:2 SDK Timestamp: 01/17/13 16:01 SDK Build Number: 14fb3ea SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.0.1 Titanium SDK Version: 3.0.2 SDK Modules API Version:2 SDK Timestamp: 01/31/13 14:52 SDK Build Number: 2da5a10 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.0.2 Titanium SDK Version: 3.0.2.GA SDK Modules API Version:2 SDK Timestamp: 02/15/13 19:02 SDK Build Number: 5a77fe7 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA Titanium SDK Version: 3.1.0 SDK Modules API Version:2 SDK Timestamp: 10/04/13 13:46 SDK Build Number: fe6c8e7 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.0 Titanium SDK Version: 3.1.0.GA SDK Modules API Version:2 SDK Timestamp: 04/15/13 18:45 SDK Build Number: 57634ef SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA Titanium SDK Version: 3.1.1 SDK Modules API Version:2 SDK Timestamp: 08/02/13 10:45 SDK Build Number: cac341d SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.1 Titanium SDK Version: 3.1.1.GA SDK Modules API Version:2 SDK Timestamp: 06/15/13 16:09 SDK Build Number: f7592c1 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA Titanium SDK Version: 3.1.2 SDK Modules API Version:2 SDK Timestamp: 08/16/13 15:55 SDK Build Number: 8eee2b4 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.2 Titanium SDK Version: 3.1.2.GA SDK Modules API Version:2 SDK Timestamp: 08/14/13 12:45 SDK Build Number: 5ceaff8 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.2.GA Titanium SDK Version: 3.1.3 SDK Modules API Version:2 SDK Timestamp: 09/16/13 15:34 SDK Build Number: c35b513 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.3 Titanium SDK Version: 3.1.3.GA SDK Modules API Version:2 SDK Timestamp: 09/18/13 12:00 SDK Build Number: 222f4d1 SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA Titanium SDK Version: 3.2.0 SDK Modules API Version:2 SDK Timestamp: 11/13/13 15:18 SDK Build Number: 981c4fa SDK Location: /Library/Application Support/Titanium/mobilesdk/osx/3.2.0 Browsers - Default system web browser: Unknown (N/A) - Firefox: 16.0.2 (/Applications/Firefox.app/Contents/MacOS/firefox-bin) - Safari: 6.0.5 (/usr/bin/open) - Chrome: 31.0.1650.48 (/Applications/Google Chrome.app/Contents/MacOS/Google Chrome) Android SDK Version: 4.4 Android NDK Version: r7 Titanium CLI Enabled: true Node.ACS Host URL: null Node.JS Version: v0.10.13 NPM Path: /usr/local/bin/npm NPM Version: 1.3.2 /Applications/Titanium_Studio/TitaniumStudio.app/Contents/MacOS └── (empty) npm ls titanium: /Applications/Titanium_Studio/TitaniumStudio.app/Contents/MacOS └── (empty) Packages: /Applications/Titanium_Studio/TitaniumStudio.app/Contents/MacOS └── (empty) NPM_CONFIG_PREFIX env value: null Npm config prefix value : /usr/local ENV: ANDROID_SDK=/Users/pwang/android-sdks ANDROID_NDK=/Users/pwang/android-ndk com.apple.java.jvmMode=client SHLVL=1 __CF_USER_TEXT_ENCODING=0x1F7:0:0 PWD=/Applications/Titanium_Studio/TitaniumStudio.app/Contents/MacOS Apple_Ubiquity_Message=/tmp/launch-wXS1cu/Apple_Ubiquity_Message LOGNAME=pwang SSH_AUTH_SOCK=/tmp/launch-i8e3VL/Listeners SHELL=/bin/bash TMPDIR=/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/ EDITOR=textwrangle NDK_CCACHE=/usr/local/bin/ccache PATH=/Users/pwang/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/pwang/android-sdks/platform-tools:/Users/pwang/android-sdks/tools COMMAND_MODE=unix2003 APTANA_VERSION=3.2.0.1364103230 USER=pwang com.apple.java.jvmTask=JNI NUM_CPUS=4 HOME=/Users/pwang Apple_PubSub_Socket_Render=/tmp/launch-wSzk4B/Render LANG=en_US.UTF-8 {code} *Output of "ti info -o json -t android":* {code} pwang$ ti info -o json -t android {	"android": {	"linux64bit": null,	"sdk": {	"path": "/Users/pwang/android-sdks",	"executables": {	"adb": "/Users/pwang/android-sdks/platform-tools/adb",	"android": "/Users/pwang/android-sdks/tools/android",	"emulator": "/Users/pwang/android-sdks/tools/emulator",	"mksdcard": "/Users/pwang/android-sdks/tools/mksdcard",	"aapt": "/Users/pwang/android-sdks/build-tools/19.0.0/aapt",	"zipalign": "/Users/pwang/android-sdks/tools/zipalign",	"aidl": "/Users/pwang/android-sdks/build-tools/19.0.0/aidl",	"dx": "/Users/pwang/android-sdks/build-tools/19.0.0/dx"	},	"dx": "/Users/pwang/android-sdks/build-tools/19.0.0/lib/dx.jar",	"proguard": "/Users/pwang/android-sdks/tools/proguard/lib/proguard.jar",	"tools": {	"path": "/Users/pwang/android-sdks/tools",	"supported": true,	"version": "22.3"	},	"platformTools": {	"path": "/Users/pwang/android-sdks/platform-tools",	"supported": true,	"version": "19"	},	"buildTools": {	"path": "/Users/pwang/android-sdks/build-tools/19.0.0",	"supported": true,	"version": "19"	}	},	"ndk": {	"path": "/Users/pwang/android-ndk",	"executables": {	"ndkbuild": "/Users/pwang/android-ndk/ndk-build"	},	"version": "r7"	},	"home": "/Users/pwang/.android",	"detectVersion": "2.0",	"vendorDependencies": {	"android sdk": ">=10 <=19",	"android build tools": ">=17 <19.x",	"android platform tools": ">=17 <=19.x",	"android tools": "22.x",	"android ndk": ">=r8e <=r9",	"node": ">0.8.0 <=0.10.x",	"java": "<=1.7.x"	},	"targets": {	"1": {	"id": "android-7",	"name": "Android 2.1",	"type": "platform",	"api-level": "7",	"revision": "3",	"skins": [	"HVGA",	"QVGA",	"WQVGA400",	"WQVGA432",	"WVGA800",	"WVGA854"	],	"abis": [	"armeabi"	],	"googleApis": false,	"path": "/Users/pwang/android-sdks/platforms/android-7",	"version": "2.1",	"androidJar": "/Users/pwang/android-sdks/platforms/android-7/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-7/framework.aidl"	},	"2": {	"id": "Google Inc.:Google APIs:7",	"name": "Google APIs",	"type": "add-on",	"vendor": "Google Inc.",	"revision": "1",	"description": "Android + Google APIs",	"based-on": {	"android-version": "2.1",	"api-level": "7"	},	"libraries": {	"com.google.android.maps": {	"jar": "maps.jar",	"description": "API for Google Maps"	}	},	"skins": [	"WVGA854",	"WQVGA400",	"HVGA",	"WQVGA432",	"WVGA800",	"QVGA"	],	"abis": [	"armeabi"	],	"googleApis": false,	"path": null,	"version": "2.1",	"androidJar": "/Users/pwang/android-sdks/platforms/android-7/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-7/framework.aidl"	},	"3": {	"id": "android-8",	"name": "Android 2.2",	"type": "platform",	"api-level": "8",	"revision": "3",	"skins": [	"HVGA",	"QVGA",	"WQVGA400",	"WQVGA432",	"WVGA800",	"WVGA854"	],	"abis": [	"armeabi"	],	"googleApis": false,	"path": "/Users/pwang/android-sdks/platforms/android-8",	"version": "2.2",	"androidJar": "/Users/pwang/android-sdks/platforms/android-8/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-8/framework.aidl"	},	"4": {	"id": "Barnes & Noble, Inc.:NOOKcolor:8",	"name": "NOOKcolor",	"type": "add-on",	"vendor": "Barnes & Noble, Inc.",	"revision": "1",	"description": "nook color",	"based-on": {	"android-version": "2.2",	"api-level": "8"	},	"skins": [	"WVGA854",	"WQVGA400",	"HVGA",	"NOOKcolor",	"WQVGA432",	"WVGA800",	"QVGA"	],	"abis": [	"armeabi"	],	"adds-usb-support-for-devices-(vendor": "0x2080)",	"googleApis": false,	"path": null,	"version": "2.2",	"androidJar": "/Users/pwang/android-sdks/platforms/android-8/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-8/framework.aidl"	},	"5": {	"id": "Barnes & Noble, Inc.:NOOKcolor:8",	"name": "NOOKcolor",	"type": "add-on",	"vendor": "Barnes & Noble, Inc.",	"revision": "1",	"description": "nook color",	"based-on": {	"android-version": "2.2",	"api-level": "8"	},	"skins": [	"WVGA854",	"WQVGA400",	"HVGA",	"NOOKcolor",	"WQVGA432",	"WVGA800",	"QVGA"	],	"abis": [	"armeabi"	],	"adds-usb-support-for-devices-(vendor": "0x2080)",	"googleApis": false,	"path": null,	"version": "2.2",	"androidJar": "/Users/pwang/android-sdks/platforms/android-8/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-8/framework.aidl"	},	"6": {	"id": "Barnes & Noble, Inc.:NOOKcolor:8",	"name": "NOOKcolor",	"type": "add-on",	"vendor": "Barnes & Noble, Inc.",	"revision": "1",	"description": "nook color",	"based-on": {	"android-version": "2.2",	"api-level": "8"	},	"skins": [	"WVGA854",	"WQVGA400",	"HVGA",	"NOOKcolor",	"WQVGA432",	"WVGA800",	"QVGA"	],	"abis": [	"armeabi"	],	"adds-usb-support-for-devices-(vendor": "0x2080)",	"googleApis": false,	"path": null,	"version": "2.2",	"androidJar": "/Users/pwang/android-sdks/platforms/android-8/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-8/framework.aidl"	},	"7": {	"id": "Google Inc.:Google APIs:8",	"name": "Google APIs",	"type": "add-on",	"vendor": "Google Inc.",	"revision": "2",	"description": "Android + Google APIs",	"based-on": {	"android-version": "2.2",	"api-level": "8"	},	"libraries": {	"com.google.android.maps": {	"jar": "maps.jar",	"description": "API for Google Maps"	}	},	"skins": [	"WVGA854",	"WQVGA400",	"HVGA",	"WQVGA432",	"WVGA800",	"QVGA"	],	"abis": [	"armeabi"	],	"googleApis": false,	"path": null,	"version": "2.2",	"androidJar": "/Users/pwang/android-sdks/platforms/android-8/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-8/framework.aidl"	},	"8": {	"id": "KYOCERA Corporation:DTS Add-On:8",	"name": "DTS Add-On",	"type": "add-on",	"vendor": "KYOCERA Corporation",	"revision": "1",	"description": "DTS Add-On",	"based-on": {	"android-version": "2.2",	"api-level": "8"	},	"libraries": {	"com.kyocera.dualscreen": {	"jar": "dualscreen.jar",	"description": "Dual Screen optional platform library"	}	},	"skins": [	"DTS400",	"WVGA854",	"WQVGA400",	"HVGA",	"DTS800",	"WQVGA432",	"WVGA800",	"QVGA"	],	"abis": [	"armeabi"	],	"googleApis": false,	"path": null,	"version": "2.2",	"androidJar": "/Users/pwang/android-sdks/platforms/android-8/android.jar",	"supported": false,	"aidl": "/Users/pwang/android-sdks/platforms/android-8/framework...
Story points: 3