我們正在使用Ionic(+ Cordova)構建一個Android應用程序。Ionic - 沒有互聯網連接
它在瀏覽器中所有的作品,但是當我建立並運行發生這種情況.apk文件:
外部圖像不會出現,內嵌谷歌地圖保持爲空。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="js/ng-cordova.min.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
</head>
<body ng-app="starter">
<ion-pane>
<ion-header-bar class="bar-stable">
</ion-header-bar>
<ion-content>
<div class="main" role="main">
<p id="geolocation">Finding geolocation...</p>
<img src="http://placehold.it/350x150.png" alt="no image" />
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d635472.0298105411!2d5.1189025!3d51.525825749999996!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1snl!2snl!4v1432033961557" width="600" height="450" frameborder="0" style="border:0"></iframe>
</div>
</ion-content>
</ion-pane>
</body>
</html>
在我們剛剛的結束標記後創建以下行config.xml文件:在我們的index.html下面的代碼
<allow-navigation href="*" />
<allow-intent href="*" />
什麼是您的互聯網許可? –
[與Android Hybid應用程序顯示遠程圖像與Ionic框架問題的可能的重複?](http://stackoverflow.com/questions/29912773/issue-with-android-hybid-app-to-display-remote-image- with-ionic-framework) – Keval
@mahdi pishguy你的意思是這條線嗎? –