[TIMOB-3021] Android: Build fails with svn in the source tree
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-09-02T14:41:25.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | Sprint 2011-35, Release 1.8.0 |
Components | Android |
Labels | n/a |
Reporter | Jon Alter |
Assignee | Vikramjeet Singh |
Created | 2011-04-15T03:34:55.000+0000 |
Updated | 2011-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
File | Date | Size |
---|---|---|
android (2).zip | 2011-08-08T10:47:32.000+0000 | 1617862 |
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:
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)
Tested using
TiSDK 1.7.2 Android Emulator 2.2Workaround
Confirmed above workaround works Add the following lines to "android/build.py" at line 526 for SDK 1.7.2Associated Helpdesk Ticket
http://appc.me/c/APP-826844Associated Helpdesk Ticket
http://appc.me/c/APP-959943Confirmed fixed with: TiSDK 1.8.0.v20110828131421 Android Emulator 2.2
Updating status to confirm fixed.
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