[AC-1299] Cannot run app onto Android emulator or device
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Invalid |
| Resolution Date | 2015-09-17T06:27:39.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Studio |
| Labels | n/a |
| Reporter | Maurizio Pinotti |
| Assignee | Shak Hossain |
| Created | 2014-09-27T08:13:55.000+0000 |
| Updated | 2016-03-08T07:37:42.000+0000 |
Description
When trying to run Android app onto emulator or device I get
[INFO] : Installing apk: ***[CUT]***.apk
[ERROR] Application Installer abnormal process termination. Process exit value was 8
From the command line I can get more info:
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
throw e;
^
has no method 'indexOf'
at /home/maurix/.titanium/mobilesdk/linux/3.3.0.GA/android/cli/hooks/run.js:189:20
The output of "adb shell" is actually an object rather than a string, so "indexOf" fails. I fixed it locally with this patch:
--- /home/maurix/.titanium/mobilesdk/linux/3.3.0.GA/android/cli/hooks/run.js.orig 2014-09-27 09:55:11.286859250 +0200
+++ /home/maurix/.titanium/mobilesdk/linux/3.3.0.GA/android/cli/hooks/run.js 2014-09-27 09:55:29.710896714 +0200
@@ -186,7 +186,8 @@
(function installApp() {
adb.shell(device.id, 'ps', function (err, output) {
- if (output.indexOf('system_server') === -1) {
+ console.log(output, typeof(output), output.toString());
+ if (output.toString().indexOf('system_server') === -1) {
logger.trace(__('Package manager not started yet, trying again in %sms...', retryInterval));
intervalTimer = setTimeout(installApp, retryInterval);
return;
Hello, As Titanium is obsolete use Appcelerator studio instead. Follow the instruction [here](https://web.appcelerator.com/product/studio) to download the latest Appcelerator studio. Also, follow the instruction [here](https://web.appcelerator.com/product/cli) to install CLI, SDK. Thanks.