Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-4510

Force full re-build discrepancy between Android and iOS - Android requires modified tiapp.xml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 1.7.1
    • Component/s: Android, Tooling
    • Environment:
    • Story Points:
      3

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                pdowsett Paul Dowsett
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-3850
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code