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 から参照しました。以前は sencha 1 で同じことをしていて成功していましたが、sencha 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 を使用してフォルダー構造を生成する必要はありますか? 2 つの lib ファイル (sencha-touch-debug.js と sencha-touch.css) を単にコピーして index.html から参照するだけでは、sencha 2 では動作しませんか?

助けてください。

ありがとうございました。

4

1 に答える 1

0

私は答えを得ました。Sencha touch 2を使用するには、sencha 1のような2つのライブラリファイルだけでなく、プロジェクトフォルダに完全なSDKを含める必要があります。完全なフレームワークを含めると問題が解決します。

ありがとう

于 2012-12-08T17:01:19.563 に答える