Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15710] Android: Module Packaging - Titanium fails to package android module project

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-12-03T22:39:01.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsAndroid
LabelsMavericks, qe-3.1.3
ReporterSamuel Dowse
AssigneeAllen Yeung
Created2013-10-09T00:07:43.000+0000
Updated2017-03-23T21:30:08.000+0000

Description

Description

Packaging an android product to the titanium SDK directory, into an already created module or to a specified location does not work. Packaging claims to have finished in the console, but an alert will be shown saying that the packaging was unsuccessful.

Steps To Reproduce

1. Open Studio 2. Create an android mobile module project 3. Package the project to the Titanium SDK

Result

Opened an alert: {quote}Launching build and packaging failed. Reason: Could not move: /Users/tester/Documents/Titanium_Studio_Workspace/android/dist/com.appcelerator.android-android-1.0.zip.{quote}

Expected Result

Project should have packaged successfully into the titanium sdk folder.

Attachments

FileDateSize
androidmodule.zip2013-12-02T21:47:52.000+000017574
log.txt2013-10-21T18:00:30.000+00008149
moduleLog.txt2013-11-11T16:06:50.000+000056879
Output.txt2013-11-13T23:00:15.000+00001887
Screen Shot 2013-10-08 at 4.42.58 PM.png2013-10-09T00:45:11.000+0000450000

Comments

  1. Shreya Chowbey 2013-10-09

    Verified this issue with : Appcelerator Studio, build: 3.1.3.201309132456 Titanium SDK: 3.1.3.GA Xcode: 5.0 OS X:10.9 ├── acs@1.0.7 ├── alloy@1.2.2 ├── npm@1.3.2 ├── titanium@3.1.2 └── titanium-code-processor@1.0.3 I am successfully able to create an android module and package it to Titanium SDK. I didn't see "launching build and packaging failed" error.
  2. Deepti Pandey 2013-10-10

    UNABLE to reproduce this scenario using: Titanium Studio, build: 3.1.4.201310100151 Titanium SDK: 3.1.3.GA Mavericks 10.9 Xcode 5.0.1 ├── acs@1.0.7 ├── alloy@1.2.2 ├── npm@1.3.2 ├── titanium@3.1.2 └── titanium-code-processor@1.0.3 Android module packages successfully to Titanium SDK.
  3. Michael Xia 2013-10-10

    [~sdowse] Could you try the same scenario with CLI 3.1.2? This looks to be an issue with CLI for Android in 3.2.0, if we could isolate it works with 3.1.2 but not the latest 3.2.0.
  4. Samuel Dowse 2013-10-10

    +Error still occurs+ Mac OSX 10.9 Mavericks Titanium Studio, build: 3.1.4.201310100151 Titanium SDK: 3.1.3.GA CLI: 3.1.2 Alloy: 1.2.2
  5. Michael Xia 2013-10-21

    Hi Samuel, could you attach the Studio log file (Help > Studio > View Log File) when this occurs? Thanks.
  6. Praveen Innamuri 2013-11-08

    The package launch shortcut fails to launch the delegate after the changes to global toolbar. Pushed changes to development to launch the corresponding delegate for packaging Android module.
  7. Marvin Rosillette 2013-11-09

    Hi everybody, I've got exactly the same issue on : Win8 Titanium Studio, build: 3.1.3.201309132423 Titanium SDK: 3.1.3.GA CLI: 3.1.2 Here is the log file : !ENTRY com.appcelerator.titanium.mobile 4 0 2013-11-09 02:11:39.278 !MESSAGE (Build 3.1.3.201309132423) [ERROR] Could not move: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip. !STACK 1 org.eclipse.core.runtime.CoreException: Could not move: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip. at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.filesystem.provider.FileStore.move(FileStore.java:415) at org.eclipse.core.internal.filesystem.local.LocalFile.move(LocalFile.java:352) at com.appcelerator.titanium.mobile.module.launching.ModulePackagerUtil.processModule(ModulePackagerUtil.java:107) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate.distribute(AndroidModulePackageLaunchConfigurationDelegate.java:141) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate.access$0(AndroidModulePackageLaunchConfigurationDelegate.java:114) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate$PackagingProcess$1.run(AndroidModulePackageLaunchConfigurationDelegate.java:230) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.eclipse.core.runtime.CoreException: File not found: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip. at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:371) at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:220) at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:143) at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:111) at org.eclipse.core.filesystem.provider.FileStore.move(FileStore.java:410) ... 6 more Caused by: java.io.FileNotFoundException: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip (Le chemin d’accès spécifié est introuvable) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:362) ... 10 more !SUBENTRY 1 org.eclipse.core.filesystem 4 272 2013-11-09 02:11:39.278 !MESSAGE Could not move: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip. !STACK 1 org.eclipse.core.runtime.CoreException: File not found: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip. at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:371) at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:220) at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:143) at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:111) at org.eclipse.core.filesystem.provider.FileStore.move(FileStore.java:410) at org.eclipse.core.internal.filesystem.local.LocalFile.move(LocalFile.java:352) at com.appcelerator.titanium.mobile.module.launching.ModulePackagerUtil.processModule(ModulePackagerUtil.java:107) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate.distribute(AndroidModulePackageLaunchConfigurationDelegate.java:141) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate.access$0(AndroidModulePackageLaunchConfigurationDelegate.java:114) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate$PackagingProcess$1.run(AndroidModulePackageLaunchConfigurationDelegate.java:230) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.io.FileNotFoundException: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip (Le chemin d’accès spécifié est introuvable) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:362) ... 10 more !SUBENTRY 2 org.eclipse.core.filesystem 4 271 2013-11-09 02:11:39.278 !MESSAGE File not found: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip. !STACK 0 java.io.FileNotFoundException: C:\Users\Marvin\Documents\Titanium_Studio_Workspace\hostfinder\dist\com.marvin.hostf-android-1.0.zip (Le chemin d’accès spécifié est introuvable) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:362) at org.eclipse.core.filesystem.provider.FileStore.copyFile(FileStore.java:220) at org.eclipse.core.filesystem.provider.FileStore.copy(FileStore.java:143) at org.eclipse.core.internal.filesystem.local.LocalFile.copy(LocalFile.java:111) at org.eclipse.core.filesystem.provider.FileStore.move(FileStore.java:410) at org.eclipse.core.internal.filesystem.local.LocalFile.move(LocalFile.java:352) at com.appcelerator.titanium.mobile.module.launching.ModulePackagerUtil.processModule(ModulePackagerUtil.java:107) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate.distribute(AndroidModulePackageLaunchConfigurationDelegate.java:141) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate.access$0(AndroidModulePackageLaunchConfigurationDelegate.java:114) at com.appcelerator.titanium.mobile.ui.module.launch.AndroidModulePackageLaunchConfigurationDelegate$PackagingProcess$1.run(AndroidModulePackageLaunchConfigurationDelegate.java:230) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) I look forward the directory "dist" in the project's directory in the workspace and it does'nt exist. Is there something required before trying to package the module ? Thanks for your help
  8. Praveen Innamuri 2013-11-11

    The reported error is due to the package file not being generated from the CLI package command., and we are incorrectly attempting to move the non-existent file. I have pushed changes to consider this condition (and additional changes for 3.2.0 build to allow packaging android module app) and show the appropriate error. However, since I'm unable to reproduce the scenario with CLI 3.1.2 and SDK 3.1.3 GA, can you provide the console output after the android app is packaged ? If there are any failures in the console output while packaging the Android app, that should attribute to the reason why the package file for the app is not generated.
  9. Samuel Dowse 2013-11-11

    +There are two attached log files:+ log.txt is the studio 3.1.3 output moduleLog.txt is the studio 3.2.0 output The screenshot attached shows the entire console output that is given.
  10. Praveen Innamuri 2013-11-11

    [~sdowse] I am specially interested in the console output rather than Studio log file. After you run packaging for Android module, there will be output in the console view indicating about executing the build.xml file and any success messages or errors while packaging the Android module. Since they may not necessarily be captured in the Studio log file, I'm interested to see whether there are any errors from the underlying CLI while packaging the module.
  11. Samuel Dowse 2013-11-11

    +Console Log:+ Executing build.xml... Distributing the module to the selected output location... Module packaging completed.
  12. Marvin Rosillette 2013-11-11

    Consol Log, display exactly the same for me :/
  13. Michael Xia 2013-11-13

    Sam attached the console output (Output.txt) when running build.xml directly since it provides more info. [~marvin07ro] Could you try the following: 1. Right-click on the build.xml file under project and select Run As > Ant Build...; 2. Select Properties tab and uncheck the option "Use global properties..."; 3. Click on "Add Properties..." and put "android.ndk" for the name and your Android NDK location for the value; 4. Hit "Run". Attaching the resulted output here will be very helpful. Thanks.
  14. Marvin Rosillette 2013-11-14

    !http://www.zimage.fr/images/169207Screen-Tita.png! here is what happened when I try the following : 1. Right-click on the build.xml file under project and select Run As > Ant Build...; 2. Select Properties tab and uncheck the option "Use global properties..."; 3. Click on "Add Properties..." and put "android.ndk" for the name and your Android NDK location for the value; 4. Hit "Run". and the log: !ENTRY org.eclipse.core.variables 4 120 2013-11-13 21:47:50.190 !MESSAGE Reference to undefined variable INSTALLED_PATH I had the same error before that, I guess I have to add INSTALLED_PATH to my path, but I don't know what value to give, plus I don't find anything on the internet.
  15. Allen Yeung 2013-12-02

    [~sdowse] which version of the android ndk are you using?
  16. Allen Yeung 2013-12-03

    Resolving as invalid. It turns out that there was a space in the NDK path and the Android NDK doesn't work well with this during a module build. I've created two separate features and related it to this ticket to improve the experience.
  17. Lee Morris 2017-03-23

    Closing ticket as invalid.

JSON Source