Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2264] file not found in assets folder

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2014-02-20T06:59:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
Labelsandroid
ReporterJude Addo
AssigneeRitu Agrawal
Created2014-02-20T05:14:47.000+0000
Updated2016-03-08T07:41:16.000+0000

Description

I tried 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)"

Comments

  1. Jude Addo 2014-02-20

    this is full code var fileName = '/data/data.json'; var file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, fileName); var json, object_name, id; var preParseData = (file.read().text); var response = JSON.parse(preParseData); var idd = response.object_name[0].id; alert(idd);
  2. Ritu Agrawal 2014-02-20

    Duplicate of TC-3797.

JSON Source