简体   繁体   中英

Sencha Touch 2.0 Base Application Not Loading in Google Chrome

I am trying to create an application in Sencha Touch 2.0, however after downloading the base application from the Sencha website the index.html page will not load past the loading screen and the AppLoadIndicator will not go away.

When opening the index.html element in Google Chrome the AppLoadingIndicator never goes away to load the main page view. This is the error I am getting in the chrome console:

XMLHttpRequest cannot load file:///C:/Users/210078420/Desktop/proficyios/app.json. Cross origin requests are only supported for HTTP. Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101

I followed this video to create the base application and I have the SDK and SDK Tools installed on my computer. http://docs.sencha.com/touch/2-0/#!/guide/getting_started

Anybody know why this is not loading correctly?

在IIS中设置mime类型以传递JSON文件

<mimeMap fileExtension=".json" mimeType="application/json">

You have various options:

  1. Use chrome with --disable-web-security (in development).
  2. Configure crossdomain policy http://en.wikipedia.org/wiki/Same_origin_policy .
  3. Change the location from absolute to relative resources/data/json.js.

Also you should try to configure an Apache or http serve to deploy the app there, not necessary but recommended.

Regards

To upload files from a URL is http, try installing a Tomcat and application load, something like,

http://localhost:8080/project_name/file.html

I hope this helps. ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM