Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4510] Force full re-build discrepancy between Android and iOS - Android requires modified tiapp.xml

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-19T01:13:30.000+0000
Affected Version/sRelease 1.7.1
Fix Version/s2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0
ComponentsAndroid, Tooling
Labelsandroidbuild, ay-verified, cb-verified
ReporterPaul Dowsett
AssigneeChris Barber
Created2011-06-27T17:48:09.000+0000
Updated2013-11-11T19:20:58.000+0000

Description

Android requires that tiapp.xml is modified (touched) to force a full rebuild, whereas iOS checks for files in the build/iphone directory. To demonstrate this, follow these steps: * cd $PROJECT/build/android * touch ../../tiapp.xml * rm -rf * (delete all files and folders within build/android) * launch app with the following code:
Ti.UI.backgroundColor = "white";
var win = Ti.UI.createWindow({
  exitOnClose: true
});
var prod_button = Ti.UI.createButton({
  width:81,
  height:21,
  top:125,
  left:150,
  title:'View Online',
  font:{fontSize:10,fontWeight:'bold'}
});
win.add(prod_button);
win.open();
* after successful app launch, replace code above (does not contain maps) with the code below (contains maps) * do *not* touch tiapp.xml * cd $PROJECT/build/android * rm -rf * (delete all files and folders within build/android) * launch app
Ti.UI.backgroundColor = "white";
var win = Ti.UI.createWindow({
  exitOnClose: true
});
var mapview = Ti.Map.createView({
  mapType: Ti.Map.STANDARD_TYPE,
  region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5},
  animate:true,
  regionFit:true,
  userLocation:true
});
win.add(mapview);
win.open();
The app does not launch, nothing is output to logcat, but the following "Application Installer" console errors occur:
[INFO] logfile = /home/appcel/Titanium Studio Workspace/testing7/build.log
[DEBUG] /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/builder.py simulator testing7 /opt/android-sdk /home/appcel/Titanium Studio Workspace/testing7 com.testing.testing7 6 WVGA800 
[INFO] Building testing7 for Android ... one moment
[INFO] Titanium SDK version: 1.7.1 (06/17/11 00:13 1293a6d...)
[DEBUG] Waiting for device to be ready ...
[TRACE] adb devices returned 1 devices/emulators
[DEBUG] Device connected... (waited 0 seconds)
[DEBUG] waited 0.004323 seconds on emulator to get ready
[DEBUG] /opt/android-sdk/platform-tools/adb -e shell ls /data/app/com.testing.testing7*.apk
[DEBUG] com.testing.testing7 installed? True
[INFO] Fastdev server running, deploying in Fastdev mode
[INFO] Copying project resources..
[TRACE] COPYING MODIFIED FILE: /home/appcel/Titanium Studio Workspace/testing7/Resources/app.js => /home/appcel/Titanium Studio Workspace/testing7/build/android/bin/assets/Resources/app.js
[TRACE] Generating Java Classes
[DEBUG] detected module analytics, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-analytics.jar
[DEBUG] detected module android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-android.jar
[DEBUG] adding required library: titanium.jar
[DEBUG] adding required library: ti-commons-codec-1.3.jar
[DEBUG] adding required library: smalljs.jar
[DEBUG] adding required library: jaxen-1.1.1.jar
[DEBUG] detected module ui, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module app, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-app.jar
[DEBUG] detected module api, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-api.jar
[DEBUG] detected module filesystem, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-filesystem.jar
[DEBUG] detected module media, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-media.jar
[DEBUG] detected module json, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-json.jar
[DEBUG] detected module locale, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-locale.jar
[INFO] Force including all modules...
[DEBUG] detected module android.calendar, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-calendar.jar
[DEBUG] detected module media.android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-media.jar
[DEBUG] detected module database, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-database.jar
[DEBUG] detected module android.optionmenu, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.clipboard, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.iphone, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.activityindicator, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module bump, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-bump.jar
[DEBUG] adding required library: bump-api.jar
[DEBUG] detected module geolocation, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-geolocation.jar
[DEBUG] detected module yahoo, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-yahoo.jar
[DEBUG] detected module network, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-network.jar
[DEBUG] detected module xml, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-xml.jar
[DEBUG] detected module utils, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-utils.jar
[DEBUG] detected module titanium.stream, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module titanium, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module kroll, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module titanium.codec, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module accelerometer, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-accelerometer.jar
[DEBUG] detected module facebook, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-facebook.jar
[DEBUG] detected module network.socket, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-network.jar
[DEBUG] detected module contacts, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-contacts.jar
[DEBUG] detected module app.android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-app.jar
[DEBUG] detected module app.properties, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-app.jar
[DEBUG] detected module android.notificationmanager, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-android.jar
[DEBUG] detected module gesture, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-gesture.jar
[DEBUG] detected module map, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-map.jar
[DEBUG] detected module platform, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-platform.jar
[DEBUG] unknown module = ui.iphone.tableviewcellselectionstyle
[DEBUG] unknown module = ui.iphone.tableviewstyle
[DEBUG] unknown module = ui.iphone.systembuttonstyle
[DEBUG] unknown module = ui.currentwindow.app.window
[DEBUG] Detecting modules in /home/appcel/Titanium Studio Workspace/testing7/modules
[DEBUG] Detecting modules in /home/appcel/.titanium/modules
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/gen/com/testing/testing7/Testing7AppInfo.java
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/AndroidManifest.xml
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/gen/com/testing/testing7/Testing7Application.java
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/gen/com/testing/testing7/Testing7Activity.java
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/.classpath
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/.project
[TRACE] Generating /home/appcel/Titanium Studio Workspace/testing7/build/android/default.properties
[TRACE] Skipping copying gitignore -> .gitignore because already exists
[DEBUG] detected module analytics, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-analytics.jar
[DEBUG] detected module android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-android.jar
[DEBUG] adding required library: titanium.jar
[DEBUG] adding required library: ti-commons-codec-1.3.jar
[DEBUG] adding required library: smalljs.jar
[DEBUG] adding required library: jaxen-1.1.1.jar
[DEBUG] detected module ui, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module app, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-app.jar
[DEBUG] detected module api, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-api.jar
[DEBUG] detected module filesystem, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-filesystem.jar
[DEBUG] detected module media, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-media.jar
[DEBUG] detected module json, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-json.jar
[DEBUG] detected module locale, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-locale.jar
[INFO] Force including all modules...
[DEBUG] detected module android.calendar, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-calendar.jar
[DEBUG] detected module media.android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-media.jar
[DEBUG] detected module database, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-database.jar
[DEBUG] detected module android.optionmenu, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.clipboard, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.iphone, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module ui.activityindicator, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-ui.jar
[DEBUG] detected module bump, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-bump.jar
[DEBUG] adding required library: bump-api.jar
[DEBUG] detected module geolocation, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-geolocation.jar
[DEBUG] detected module yahoo, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-yahoo.jar
[DEBUG] detected module network, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-network.jar
[DEBUG] detected module xml, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-xml.jar
[DEBUG] detected module utils, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-utils.jar
[DEBUG] detected module titanium.stream, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module titanium, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module kroll, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module titanium.codec, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/titanium.jar
[DEBUG] detected module accelerometer, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-accelerometer.jar
[DEBUG] detected module facebook, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-facebook.jar
[DEBUG] detected module network.socket, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-network.jar
[DEBUG] detected module contacts, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-contacts.jar
[DEBUG] detected module app.android, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-app.jar
[DEBUG] detected module app.properties, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-app.jar
[DEBUG] detected module android.notificationmanager, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-android.jar
[DEBUG] detected module gesture, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-gesture.jar
[DEBUG] detected module map, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-map.jar
[DEBUG] detected module platform, path = /home/appcel/.titanium/mobilesdk/linux/1.7.1/android/modules/titanium-platform.jar
[INFO] Compiling Javascript Resources ...
[DEBUG] Processing Android resource drawables
[DEBUG] Detecting modules in /home/appcel/Titanium Studio Workspace/testing7/modules
[DEBUG] Detecting modules in /home/appcel/.titanium/modules
[DEBUG] app stylesheet => /home/appcel/Titanium Studio Workspace/testing7/build/android/gen/com/testing/testing7/ApplicationStylesheet.java
[DEBUG] copying app icon: /home/appcel/Titanium Studio Workspace/testing7/build/android/bin/assets/Resources/appicon.png
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR]   File "/home/appcel/.titanium/mobilesdk/linux/1.7.1/android/builder.py", line 1947, in <module>
[ERROR]     s.build_and_run(False, avd_id, debugger_host=debugger_host)
[ERROR]   File "/home/appcel/.titanium/mobilesdk/linux/1.7.1/android/builder.py", line 1740, in build_and_run
[ERROR]     self.manifest_changed = self.generate_android_manifest(compiler)
[ERROR]   File "/home/appcel/.titanium/mobilesdk/linux/1.7.1/android/builder.py", line 811, in generate_android_manifest
[ERROR]     shutil.copy(iconpath, dest_icon)
[ERROR]   File "/usr/lib/python2.6/shutil.py", line 88, in copy
[ERROR]     copyfile(src, dst)
[ERROR]   File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
[ERROR]     fsrc = open(src, 'rb')
[ERROR] IOError: [Errno 2] No such file or directory: u'/home/appcel/Titanium Studio Workspace/testing7/build/android/bin/assets/Resources/appicon.png'
* no improvement is observed when the app is relaunched any number of times * once the tiapp.xml file is touched, a "Detected tiapp.xml change, forcing full re-build..." message is output to the console, and the app is launched as expected

Comments

  1. Chris Barber 2013-10-18

    The new Android build solves this. It no longer requires tiapp.xml to be modified to force a rebuild. It carefully checks 33 variables that can trigger a full rebuild.
  2. Allen Yeung 2013-10-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/4781
  3. Samuel Dowse 2013-11-11

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311100540 Titanium SDK, build: 3.2.0.v20131110134044 CLI: 3.2.0 Alloy: 1.3.0 Project successfully builds and installs on emulator without needing to touch tiapp.xml. Closing.

JSON Source