1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] :  Failed to package application:

I am facing this error while running my application. It builds successfully but cannot be installed on the emulator or my android phone.

I have set environment variables as follows:- Path

C:\Users\mumar_000\AppData\Roaming\npm;C:\xampp\php;C:\Android\android-sdk-windows;C:\Program Files (x86)\Java\jre6\bin;%PATH%"C:\Android\TitaniumStudio.exe" &;C:\Program Files\nodejs;

JAVA_HOME

C:\Program Files (x86)\Java\jdk1.6.0_45\bin\java.exe;

Kindly help me regarding this issue.

Thanks ...

Remees M Syde
  • 2,564
  • 1
  • 19
  • 42
  • http://stackoverflow.com/a/17992524/3419997 may help – turtle Nov 14 '14 at 06:33
  • I have already done all these steps but still i am facing the same problem. Kindly help me regarding this issue – Muhammad Umar Nov 14 '14 at 06:46
  • this is the most annoying thing in titanium, another dirty fix could be to install apk via cmd. first `cd your_project_root_directory`, then type `titanium build --platform android --build-only`, after that type `adb install -r build/android/bin/app.apk` – turtle Nov 14 '14 at 07:06
  • when i typed "titanium build --platform android --build-only" the terminal gave me lots of errors:- unable to find jdk please verify your java_home environment variables – Muhammad Umar Nov 14 '14 at 07:14
  • error: The java_home must point to the jdk but not to the jre error: You may want to reinstall the jdk from ....... – Muhammad Umar Nov 14 '14 at 07:29
  • try running command `java` and `javac` in cmd, if it does not works then java is not added in you environment variables properly. – turtle Nov 14 '14 at 08:14
  • All the path errors have been resolved but two other errors have been appeared:- error: Failed to package application error: reset package include C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\android\titanium.jar not found – Muhammad Umar Nov 14 '14 at 13:05
  • Please help me to solve this problem – Muhammad Umar Nov 14 '14 at 13:05

1 Answers1

0

There might be one of these solution:

  1. Delete the build folder, clean the project and try to reinstall it.

  2. On Android devices, I uninstall the same application [if I installed it before], then install the app again. This is the issue with Android devices.

  3. Sometimes, when device doesn't have enough memory to install the app, it gives the same error. Try to remove some apps to make space.

Still, if something goes wrong, you have the option to transfer .apk file to your device and install it from there. The thing is, you won't get logs.

Porwal
  • 330
  • 5
  • 18
  • Please have a look on the errors i have mentioned above. And then suggest me what should i do. I have already done all the three steps you have mentioned above Thanks – Muhammad Umar Nov 14 '14 at 10:03
  • Okay. In environment variables, the path should be of jdk-bin not jre-bin. What you set is `C:\Program Files (x86)\Java\jre6\bin` Try setting jdk-bin path instead of this. – Porwal Nov 14 '14 at 10:13
  • Also, JAVA_HOME path should be set like this: http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7 It's not the path to the java.exe file – Porwal Nov 14 '14 at 10:17
  • After following these steps lots of errors have removed and i am remaining with the following two errors:- error: Java development kit not found error: If you already have installed jdk then verify java_home variable is correctly set Thanks – Muhammad Umar Nov 14 '14 at 11:13
  • can you post your current JAVA_HOME path again please? – Porwal Nov 14 '14 at 11:20
  • Thanks brother! All the path issues have been resolved but two other errors have been appeared:- error: Failed to package application error: reset package include C:\ProgramData\Titanium\mobilesdk\win32\3.4.0.GA\android\titanium.jar not found – Muhammad Umar Nov 14 '14 at 11:33
  • sure brother. My current java_home path is: C:\Program Files (x86)\Java; and that of PATH variable is:- C:\Users\mumar_000\AppData\Roaming\npm;C:\xampp\php;C:\Android\android-sdk-windows;C:\Program Files (x86)\Java\jre6;%PATH%"C:\Android\TitaniumStudio.exe" &;C:\Program Files\nodejs;C:\Android\android-sdk-windows\tools;C:\Program Files (x86)\Java\jdk1.6.0_45\bin; – Muhammad Umar Nov 14 '14 at 11:39
  • Can you try this once: https://developer.appcelerator.com/question/178926/cant-run-first-ever-app-on-titanium – Porwal Nov 14 '14 at 12:29
  • Still m facing the same error My console is:- [ERROR] Application Installer abnormal process termination. Process exit value was 1 [ERROR] : Failed to package application: – Muhammad Umar Nov 14 '14 at 13:03
  • Check this: https://developer.appcelerator.com/question/178514/ .. A detailed one. I am not sure what exactly happening in that. Are you using any custom theme? – Porwal Nov 14 '14 at 16:45
  • Still i am facing the same situation. – Muhammad Umar Nov 19 '14 at 11:16
  • What version of Titanium are you using? in tiapp.xml, is the android target version correct? – Porwal Nov 19 '14 at 11:26
  • 3.4.0.GA and i have installed sdk 1.6 – Muhammad Umar Nov 19 '14 at 12:51
  • Titanium studio version is 3.4.1 – Muhammad Umar Nov 19 '14 at 12:59
  • I was asking about the Android target version in your tiapp.xml file, like this: `` .. Sometimes it also happens when `minSdkVersion` is set higher than the version used by the Android device. – Porwal Nov 19 '14 at 15:45
  • One of the issues mentioned above must be the reason for your errors. – Porwal Nov 19 '14 at 15:46
  • My system variables are:- F:\app\mumar_000\product\11.2.0\client_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\xampp\php;C:\Android\android-sdk-windows;C:\Program Files (x86)\Java\jdk1.6.0_45\bin;C:\Program Files (x86)\Java\jre1.6.0_07; – Muhammad Umar Nov 21 '14 at 07:58
  • My user variables are:- C:\Users\mumar_000\AppData\Roaming\npm;C:\xampp\php;C:\Android\android-sdk-windows;C:\Program Files (x86)\Java\jre6;%PATH%"C:\Android\TitaniumStudio.exe" &;C:\Program Files\nodejs;C:\Android\android-sdk-windows\tools;C:\Program Files (x86)\Java\jdk1.6.0_45\bin; – Muhammad Umar Nov 21 '14 at 07:59
  • Change this `` line like this: `` .. and let me know – Porwal Nov 23 '14 at 03:17