Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1299] Cannot run app onto Android emulator or device

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2015-09-17T06:27:39.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio
Labelsn/a
ReporterMaurizio Pinotti
AssigneeShak Hossain
Created2014-09-27T08:13:55.000+0000
Updated2016-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;

Comments

  1. Amimul Hossain 2015-08-30

    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.

JSON Source