Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3021] Android: Build fails with svn in the source tree

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-09-02T14:41:25.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-35, Release 1.8.0
ComponentsAndroid
Labelsn/a
ReporterJon Alter
AssigneeVikramjeet Singh
Created2011-04-15T03:34:55.000+0000
Updated2011-09-13T10:00:39.000+0000

Description

Hi,

I was playing around with the 1.6 SDK today and tried to build one of my projects against it. Much to my surprise, I got an error the first time out. After playing around, I discovered that it was my version control system (Subversion) that was causing the crashes. It seems that builder.py is querying all files and directories and not excluding certain one's like .svn Anyways, I deleted all of my .svn directories and everything worked fine. Below is the trace output from my build error. To reproduce this error, all you have to do is check out a titanium project from subversion, touch the tiapp.xml file to get a full re-build and presto, here it is!

[INFO] Building Health Watch for Android ... one moment [DEBUG] C:\ProgramData\Android\android-sdk-windows\platform-tools\adb.exe start-server [INFO] Titanium SDK version: 1.6.0 (02/01/11 17:45 a632082...) [DEBUG] Waiting for device to be ready ... [TRACE] adb devices returned 2 devices/emulators [DEBUG] Device connected... (waited 0 seconds) [DEBUG] waited 0.058000 seconds on emulator to get ready [DEBUG] C:\ProgramData\Android\android-sdk-windows\platform-tools\adb.exe -e shell ls /data/app/org.rarely.apps.healthwatch.apk [DEBUG] org.rarely.apps.healthwatch installed? False [DEBUG] C:\ProgramData\Android\android-sdk-windows\platform-tools\adb.exe -e shell ls /sdcard/Ti.debug/org.rarely.apps.healthwatch/Resources/app.js [DEBUG] org.rarely.apps.healthwatch resources installed? False [INFO] Copying project resources.. [INFO] Detected tiapp.xml change, forcing full re-build... [TRACE] COPYING CREATED FILE: C:\Projects\Health Watch\Resources\android\appicon.png => C:\Projects\Health Watch\build\android\bin\assets\Resources\appicon.png [TRACE] COPYING CREATED FILE: C:\Projects\Health Watch\Resources\android\default.png => C:\Projects\Health Watch\build\android\bin\assets\Resources\default.png [TRACE] COPYING CREATED FILE: C:\Projects\Health Watch\Resources\app.js => C:\Projects\Health Watch\build\android\bin\assets\Resources\app.js [TRACE] COPYING CREATED FILE: C:\Projects\Health Watch\Resources\default_app_logo.png => C:\Projects\Health Watch\build\android\bin\assets\Resources\default_app_logo.png [TRACE] COPYING CREATED FILE: C:\Projects\Health Watch\Resources\KS_nav_ui.png => C:\Projects\Health Watch\build\android\bin\assets\Resources\KS_nav_ui.png [TRACE] COPYING CREATED FILE: C:\Projects\Health Watch\Resources\KS_nav_views.png => C:\Projects\Health Watch\build\android\bin\assets\Resources\KS_nav_views.png [TRACE] Generating Java Classes [DEBUG] detected module analytics, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-analytics.jar [DEBUG] detected module android, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\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 = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-ui.jar [DEBUG] detected module app, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-app.jar [DEBUG] detected module api, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-api.jar [DEBUG] detected module filesystem, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-filesystem.jar [DEBUG] detected module media, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-media.jar [DEBUG] detected module json, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-json.jar [DEBUG] detected module locale, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-locale.jar [DEBUG] Detecting modules in C:\Projects\Health Watch\modules [DEBUG] Detecting modules in C:\ProgramData\Titanium\modules [TRACE] Generating C:\Projects\Health Watch\build\android\gen\org\rarely\apps\healthwatch\HealthWatchAppInfo.java [TRACE] Generating C:\Projects\Health Watch\build\android\AndroidManifest.xml [TRACE] Generating C:\Projects\Health Watch\build\android\gen\org\rarely\apps\healthwatch\HealthWatchApplication.java [TRACE] Generating C:\Projects\Health Watch\build\android\gen\org\rarely\apps\healthwatch\HealthWatchActivity.java [TRACE] Generating C:\Projects\Health Watch\build\android.classpath [TRACE] Generating C:\Projects\Health Watch\build\android.project [TRACE] Generating C:\Projects\Health Watch\build\android\default.properties [TRACE] Skipping copying gitignore -> .gitignore because already exists [DEBUG] detected module analytics, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-analytics.jar [DEBUG] detected module android, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\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 = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-ui.jar [DEBUG] detected module app, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-app.jar [DEBUG] detected module api, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-api.jar [DEBUG] detected module filesystem, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-filesystem.jar [DEBUG] detected module media, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-media.jar [DEBUG] detected module json, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-json.jar [DEBUG] detected module locale, path = C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\modules\titanium-locale.jar [INFO] Compiling Javascript Resources ... [DEBUG] Processing Android resource drawables [TRACE] COPYING FILE: C:\Projects\Health Watch\Resources\android\images\res-long-land-hdpi.svn\all-wcprops => C:\Projects\Health Watch\build\android\res\drawable-long-land-hdpi_20f791a761.svn/all-wcprops [ERROR] Error in compiler. , [Errno 2] No such file or directory: 'C:\Projects\Health Watch\build\android\res\drawable-long-land-hdpi\20f791a761.svn/all-wcprops'; Traceback (most recent call last): File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\builder.py", line 1626, in s.build_and_run(False,avd_id) File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\builder.py", line 1392, in build_and_run self.copy_resource_drawables() File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\builder.py", line 501, in copy_resource_drawables copy_resource_drawable(f) File "C:\ProgramData\Titanium\mobilesdk\win32\1.6.0\android\builder.py", line 481, in copy_resource_drawable shutil.copy(orig, dest) File "C:\Python25\lib\shutil.py", line 85, in copy copyfile(src, dst) File "C:\Python25\lib\shutil.py", line 52, in copyfile fdst = open(dst, 'wb') IOError: [Errno 2] No such file or directory: 'C:\Projects\Health Watch\build\android\res\drawable-long-land-hdpi\20f791a761.svn/all-wcprops'

Attachments

FileDateSize
android (2).zip2011-08-08T10:47:32.000+00001617862

Comments

  1. newgen 2011-04-15

    i had the same problem here.

    can be fixed by adding the following lines in the file "android\builder.py", function "copy_resource_drawable" after the line 468:

    if '.svn' in orig:

       return
       
  2. Jon Alter 2011-08-08

    I have attached and archive named "android (2).zip" that you can use to reproduce this error. Step 1: replace the android folder in your project with the one in the archive. Step 2: run your application Step 3: see the build fail (console log below)
       [DEBUG] Processing Android resource drawables 
       [TRACE] COPYING FILE: /Users/wizard/Documents/development/svn/products/eventsentry/mobile/Resources/android/images/res-long-land-hdpi/KS_nav_networkstatus.png => /Users/wizard/Documents/development/svn/products/eventsentry/mobile/build/android/res/drawable-long-land-hdpi/ks_nav_networkstatus_d1a7f6f713.png 
       [TRACE] COPYING FILE: /Users/wizard/Documents/development/svn/products/eventsentry/mobile/Resources/android/images/res-long-land-hdpi/.svn/all-wcprops => /Users/wizard/Documents/development/svn/products/eventsentry/mobile/build/android/res/drawable-long-land-hdpi/_20f791a761.svn/all-wcprops [ERROR] Exception occured while building Android project: 
       [ERROR] Traceback (most recent call last): [ERROR] File "/Users/wizard/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/android/builder.py", line 1958, in <module> 
       [ERROR] s.build_and_run(False, avd_id, debugger_host=debugger_host) 
       [ERROR] File "/Users/wizard/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/android/builder.py", line 1729, in build_and_run 
       [ERROR] self.resource_drawables_changed = self.copy_resource_drawables() 
       [ERROR] File "/Users/wizard/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/android/builder.py", line 563, in copy_resource_drawables 
       [ERROR] copy_resource_drawable(f) 
       [ERROR] File "/Users/wizard/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/android/builder.py", line 538, in copy_resource_drawable 
       [ERROR] shutil.copy(orig, dest) 
       [ERROR] File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 116, in copy [ERROR] copyfile(src, dst) 
       [ERROR] File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile 
       [ERROR] with open(dst, 'wb') as fdst: 
       [ERROR] IOError: [Errno 2] No such file or directory: '/Users/wizard/Documents/development/svn/products/eventsentry/mobile/build/android/res/drawable-long-land-hdpi/_20f791a761.svn/all-wcprops'
       

    Tested using

    TiSDK 1.7.2 Android Emulator 2.2

    Workaround

    Confirmed above workaround works Add the following lines to "android/build.py" at line 526 for SDK 1.7.2
       if '.svn' in orig:
       	return
       

    Associated Helpdesk Ticket

    http://appc.me/c/APP-826844
  3. Jon Alter 2011-09-01

    Associated Helpdesk Ticket

    http://appc.me/c/APP-959943
  4. Jon Alter 2011-09-01

    Confirmed fixed with: TiSDK 1.8.0.v20110828131421 Android Emulator 2.2
  5. Don Thorp 2011-09-02

    Updating status to confirm fixed.
  6. Vikramjeet Singh 2011-09-13

    Resolved. Tested on: Mac OSX Lion TiMob: 1.8.0.v20110906155354 TiStud: 1.0.5.201109091616 Devices Used: Android Emulator 2.2 Droid3 Google Nexus S

JSON Source