Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2252] every file i copy to resources drectory is removed when debugging alloy project

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-03T02:51:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterJude Addo
AssigneeRitu Agrawal
Created2014-02-19T21:41:26.000+0000
Updated2016-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

FileDateSize
.log2014-02-19T21:41:35.000+00003023
.log2014-02-19T21:41:28.000+00003023
diagnostic6466857774981459190.log2014-02-19T21:41:33.000+000014187

Comments

  1. Jude Addo 2014-02-19

    SDK version is 3.2.1.GA
  2. Ritu Agrawal 2014-02-20

    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' })
  3. Jude Addo 2014-02-20

    thanks! it worked.
  4. Jude Addo 2014-02-20

    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)"
  5. Ritu Agrawal 2014-02-20

    Reopening this ticket to investigate the second issue.
  6. Ritu Agrawal 2014-02-24

    Please provide a simple runnable test case to reproduce this error as I am not sure how are you using fileName in your application.
  7. Ritu Agrawal 2014-03-03

    Resolving this ticket as we have not been able to reproduce it and the reporter has not followed up on the requested information.

JSON Source