cordova.js 在 ionic 应用程序中找不到文件?
cordova.js file not found in ionic app?
当我在 android 设备中使用 运行 应用程序时,我遇到了这个错误,而且 inappbrowser 也无法正常工作,帮我解决问题...
错误
file:///android_asset/www/js/cordova.js Failed to load resource: net::ERR_FILE_NOT_FOUND
app.js:8 Route change!!!
app.js:8 Route change!!! /home
file:///android_asset/www/%7B%7Bn.imgurl%7D%7D Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///android_asset/www/%7B%7Bt.imgurl%7D%7D Failed to load resource: net::ERR_FILE_NOT_FOUND
ionic.bundle.min.js:22 'Touch.webkitRadiusX' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.radiusX' instead.
ionic.bundle.min.js:22 'Touch.webkitRadiusY' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.radiusY' instead.
ionic.bundle.min.js:22 'Touch.webkitRotationAngle' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.rotationAngle' instead.
ionic.bundle.min.js:22 'Touch.webkitForce' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.force' instead.
index.html
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<!-- your app's css -->
<link href="css/style.css" rel="stylesheet">
<link href="css/tabSlideBox.css" rel="stylesheet">
<!-- ionic/angularjs scripts -->
<!--<script src="http://code.ionicframework.com/1.0.0-rc.4/js/ionic.bundle.min.js"></script> -->
<!--<script src="lib/ionic/js/ionic.bundle.min.js"></script> -->
<script src="lib/ionic/js/ionic.bundle.min.js"></script>
<script src="js/jquery-1.12.4.min.js"></script>
<script src="js/cordova.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="js/tabSlideBox.js"></script>
改变这个
<script src="js/cordova.js"></script>
到
<script src="cordova.js"></script>
当你 运行 cordova 平台添加 android 然后 cordova build android,您应该得到 cordova.js 添加的 project/platforms/android/assets/www 文件夹 。您不需要将它添加到您的 js 文件中。所以,只需在 index.js 文件中声明如下,
<script src="cordova.js"></script>
当我在 android 设备中使用 运行 应用程序时,我遇到了这个错误,而且 inappbrowser 也无法正常工作,帮我解决问题...
错误
file:///android_asset/www/js/cordova.js Failed to load resource: net::ERR_FILE_NOT_FOUND
app.js:8 Route change!!!
app.js:8 Route change!!! /home
file:///android_asset/www/%7B%7Bn.imgurl%7D%7D Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///android_asset/www/%7B%7Bt.imgurl%7D%7D Failed to load resource: net::ERR_FILE_NOT_FOUND
ionic.bundle.min.js:22 'Touch.webkitRadiusX' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.radiusX' instead.
ionic.bundle.min.js:22 'Touch.webkitRadiusY' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.radiusY' instead.
ionic.bundle.min.js:22 'Touch.webkitRotationAngle' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.rotationAngle' instead.
ionic.bundle.min.js:22 'Touch.webkitForce' is deprecated and will be removed in M47, around November 2015. Please use 'Touch.force' instead.
index.html
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<!-- your app's css -->
<link href="css/style.css" rel="stylesheet">
<link href="css/tabSlideBox.css" rel="stylesheet">
<!-- ionic/angularjs scripts -->
<!--<script src="http://code.ionicframework.com/1.0.0-rc.4/js/ionic.bundle.min.js"></script> -->
<!--<script src="lib/ionic/js/ionic.bundle.min.js"></script> -->
<script src="lib/ionic/js/ionic.bundle.min.js"></script>
<script src="js/jquery-1.12.4.min.js"></script>
<script src="js/cordova.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="js/tabSlideBox.js"></script>
改变这个
<script src="js/cordova.js"></script>
到
<script src="cordova.js"></script>
当你 运行 cordova 平台添加 android 然后 cordova build android,您应该得到 cordova.js 添加的 project/platforms/android/assets/www 文件夹 。您不需要将它添加到您的 js 文件中。所以,只需在 index.js 文件中声明如下,
<script src="cordova.js"></script>