2

編集:プロジェクトを完全に再作成しても、更新後も機能しません。 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) 
+0

.. [http://stackoverflow.com/questions/39455923/ionic-templates-not-loading-in -visual-studio-2015-community-edition-even-after-i] –

+0

私はプロジェクトを完全に作り直しましたが、アップデート後もまだ動作しません。 Visual Studio v.14.0.25431.01アップデート3およびApache Cordovaアップデート10のツール –

+0

Rippleをクロムエクステンションとして実行するのか、この記事で説明するように実行しますか:https://www.raymondcamden.com/2013/11/05/Ripple-is-Reborn /? Chrome拡張機能として使用するときに問題が発生しましたが、記事の設定方法に従うと問題なく動作します。 (そしてjqueryで動作します) – nyluje

答えて

3

を取得します。問題は、jQueryの一部のバージョンでjQuery.mobileがロックされていることです。 jQueryバージョン2.x.xでは、バージョン3.x.xではOKです。あなたが説明したエラーを引き起こしている可能性がありますjQuery 3.1.1のアンインストール。 jQuery 2.2.4をインストールします。私の問題を解決しました。

同様の問題の発見の答え:それはそれを修正する場合、私は現在、私のVisual Studioを更新していますjquery.mobile 1.4.5 Uncaught TypeError: Cannot read property 'concat' of undefined

+0

しばらくしてjQuery Mobileの使用を停止しました。それは時代遅れであり、実際にはもう更新されていないようです。Ionic Frameworkなどを調べることをお勧めします。Ionic + Angularは良いコンボのようです。 –

関連する問題