Weinre - 无法在目标

时间:2016-10-18 06:11:27

标签: javascript android cordova ionic-framework weinre

我正在尝试在我的笔记本电脑IP(Say 130.x.x.x)上运行weinre,并且移动设备和笔记本电脑都在同一个WiFi网络中。我在我的离子项目的index.html中添加了脚本文件URL。当我尝试在我的移动浏览器(chrome app)上打开weinre或target-script-min.js文件时,我能够查看相同的内容(防火墙没有问题)。但是,如果我尝试运行我的应用程序,我会收到

  

“无法加载资源:   http://130.x.x.x:8080/target/target-script-min.js#anonymous   资源:服务器响应状态为404(未找到)“

我搜索了一下,发现了与 cordova-whitelist 插件相关的问题。我已经验证,默认情况下我已经允许所有IP

<content src="index.html"/>
  <access origin="*"/>
  <allow-navigation href="http://130.x.x.x/*" />
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="SplashScreenDelay" value="2000"/>
  <preference name="FadeSplashScreenDuration" value="2000"/>
  <preference name="android-minSdkVersion" value="16"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="SplashScreen" value="screen"/>

我仍然无法找到我无法在我的应用中下载.js的确切原因。任何可能出错的想法。

0 个答案:

没有答案