[AC-2252] every file i copy to resources drectory is removed when debugging alloy project
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-03-03T02:51:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Jude Addo |
Assignee | Ritu Agrawal |
Created | 2014-02-19T21:41:26.000+0000 |
Updated | 2016-03-08T07:41:15.000+0000 |
Description
Steps to Reproduce
1. create new alloy project
2. copy file to the resources directory
3. debug project
4. check if file is still there
Actual Result
file is removed
Expected Result
file must be available so i can access it on app
Attachments
SDK version is 3.2.1.GA
We recommend you to put local files under \app\assets\ folder. \assets* folders are copied to \Resources folder as part of the build process. For example, you can put a .jpg file under a new \app\assets\app_images folder and access it in your code: var image = Ti.UI.createImageView({ image: '/app_images/random.jpg' })
thanks! it worked.
I tried to use the same idea to load a json file which i have stored in \app\assets\data. i tried reading it from the controller like this var fileName = '/data/data.json'; but i get this error "/data/data/com.isasgh.icgc.lwd/app_appdata/data/data.json: open failed: ENOENT (No such file or directory)"
Reopening this ticket to investigate the second issue.
Please provide a simple runnable test case to reproduce this error as I am not sure how are you using fileName in your application.
Resolving this ticket as we have not been able to reproduce it and the reporter has not followed up on the requested information.