編集:プロジェクトを完全に再作成しても、更新後も機能しません。 Visual Studio v.14.0.25431.01アップデート3とApache Cordovaアップデート10用ツール 私はAVD google androidエミュレータを試しました。ビジュアルスタジオでJqueryモバイルページが機能しない
私はVisual Studio 2015を使用しています。v.14.0.24720.00 Visual StudioでCordova(v.3.0.0)プロジェクトを作成しました。 ツール - > NuGetパッケージマネージャ - >ソリューションパッケージのJquery 3.1.0およびJQueryモバイル1.4.5がインストールされています。ここでは、インデックスはちょうどこのチュートリアルのような
var element = document.getElementById("deviceready");
element.innerHTML = 'Device Ready';
element.className += ' ready';
https://taco.visualstudio.com/en-us/docs/get-started-first-mobile-app/
: は、コンテンツから/ WWW/CSSへ/とスクリプトから/ index.jsからWWW /スクリプト/ 削除これらの行にファイルを移動しました。 html
<!DOCTYPE html>
<html>
<head>
<!--
Customize the content security policy in the meta tag below as needed. Add 'unsafe-inline' to default-src to enable inline JavaScript.
For details, see http://go.microsoft.com/fwlink/?LinkID=617521
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<title>project name</title>
</head>
<body>
<div data-role="page" id="pageone">
<div data-role="header">
<h1>Insert Page Title Here</h1>
</div>
<div data-role="main" class="ui-content">
<p>Insert Content Here</p>
</div>
<div data-role="footer">
<h1>Insert Footer Text Here</h1>
</div>
</div>
<script type="text/javascript" src="scripts/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="scripts/jquery.mobile-1.4.5.min.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="scripts/platformOverrides.js"></script>
<script type="text/javascript" src="scripts/index.js"></script>
</body>
</html>
index.cssも空です。
これまでにCordovaプロジェクトをうまく使いましたが、今回は最新のjquery-libraryで新しいプロジェクトを作成しようとしたときにこの問題が発生しました。これをRippleエミュレータで実行すると、jquery-mobile CSSと機能がページにロードされません。それは、それがそうであるように、より大きなh1タグでテキストを表示するだけです。
そして、私はこのエラーが同じ問題で苦労し
Uncaught TypeError: Cannot read property 'concat' of undefined
jquery.mobile-1.4.5.min.js (4,5780)
.. [http://stackoverflow.com/questions/39455923/ionic-templates-not-loading-in -visual-studio-2015-community-edition-even-after-i] –
私はプロジェクトを完全に作り直しましたが、アップデート後もまだ動作しません。 Visual Studio v.14.0.25431.01アップデート3およびApache Cordovaアップデート10のツール –
Rippleをクロムエクステンションとして実行するのか、この記事で説明するように実行しますか:https://www.raymondcamden.com/2013/11/05/Ripple-is-Reborn /? Chrome拡張機能として使用するときに問題が発生しましたが、記事の設定方法に従うと問題なく動作します。 (そしてjqueryで動作します) – nyluje