0

在此处输入图像描述我是 sencha 2 的新手。我想使用 sencha touch 运行一个基本应用程序,但无法加载该应用程序。

这是我所做的。

我已经从 miamicoder 下载了 notesApp,我正在尝试运行第一章。

我在屏幕截图中附加了文件夹结构。请查看以了解文件夹结构。

这是我的 index.html

<!DOCTYPE html>
<html>
<head>
    <title>My Notes</title>
    <link href="sencha-touch.css" rel="stylesheet" type="text/css" />
    <script src="sencha-touch-debug.js" type="text/javascript"></script>
    <script src="app.js" type="text/javascript"></script>
</head>
<body>

</body>
</html>

我已经下载了 sencha sdk 2.1 并将 sencha-touch-debug.js 和 sencha-touch.css 放在文件夹的根目录中,并从 index.html 中引用,如下所述。我曾经在煎茶 1 中做同样的事情并且我取得了成功,但是如果我尝试对煎茶 2 做同样的事情,我会遇到错误。

我收到如下错误。

Failed to load resource file:///path/NotesApp-Book-Code-Ch1/src/event/Dispatcher.js?_dc=1354982532236
Failed to load resource file:///path/NotesApp-Book-Code-Ch1/src/event/publisher/Dom.js?_dc=1354982532238
Uncaught Error: [Ext.Loader] Failed loading 'file:///path/ebook-building-a-sencha-touch-2-app%20(1)/NotesApp-Book-Code-Ch1/src/event/Dispatcher.js', please verify that the file exists sencha-touch-debug.js:8324
Uncaught Error: [Ext.Loader] Failed loading 'file:///path/ebook-building-a-sencha-touch-2-app%20(1)/NotesApp-Book-Code-Ch1/src/event/publisher/Dom.js', please verify that the file exists 

是否需要使用senchatools并生成文件夹结构?简单地复制两个 lib 文件(sencha-touch-debug.js 和 sencha-touch.css)并从 index.html 引用它们不适用于 sencha 2?

请帮忙。

谢谢你。

4

1 回答 1

0

我得到了答案。使用 Sencha touch 2 需要在项目文件夹中包含完整的 SDK,而不仅仅是像 sencha 1 这样的 2 个库文件。包含完整的框架将解决问题。

谢谢

于 2012-12-08T17:01:19.563 回答