简体   繁体   English

无法使用Cordova加载资源:net :: ERR_FILE_NOT_FOUND

[英]Failed to load resource: net::ERR_FILE_NOT_FOUND with Cordova

I am following the aerogear tutorial on https://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/ . 我正在关注https://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/上的aerogear教程。

I have gone through this several times now and continue to have the same issue. 我已经经历了几次,并继续遇到同样的问题。

When deploying to Genymotion, and debugging using chrome, I see the following error: 当部署到Genymotion并使用chrome进行调试时,我看到以下错误:

file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear-push.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear.ajax.js Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1431 Uncaught Error: Module aerogear-cordova-push.AeroGear.ajax does not exist.
cordova.js:1185 deviceready has not fired after 5 seconds.
cordova.js:1178 Channel not fired: onPluginsReady
cordova.js:1178 Channel not fired: onCordovaReady

Observations 观察结果

I notice that, when viewing in the Chrome inspector, that the plugin files are empty 我注意到,在Chrome检查器中查看时,插件文件为空 插件文件为空 , yet in my local project there is contents for all the plugin files. ,但是在我的本地项目中,所有插件文件都有内容。

Things I have tried 我尝试过的事情

  • Removing and re-adding aerogear plugs 卸下并重新添加航空发动机插头
  • Doing a factory reset of the Genymotion vm. 对Genymotion虚拟机进行出厂重置。
  • Uninstall and reinstall node using instructions on Installing NodeJS without sudo in Ubuntu 使用有关在Ubuntu中不使用sudo安装NodeJS的说明卸载并重新安装节点
  • Reinstall cordova 重新安装cordova
  • Reinstall genymotion 重新安装genymotion
  • Restart 重新开始

Details 细节

  • Node version v5.4.1 节点版本v5.4.1
  • Ubuntu version 15.10 Ubuntu版本15.10
  • Cordova 5.4.1 科尔多瓦5.4.1
  • Android 5.1 Android 5.1

Does anyone know how to fix this? 有谁知道如何解决这一问题?

Thanks 谢谢

I cannot say for sure why fixed it, but I suspect it was due to either: 我不能肯定地说为什么要修复它,但是我怀疑是由于以下原因之一:

  • permissions 权限
  • corrupted dependencies 损坏的依赖项

After reinstalling and re-setting permissions - and doing a restart - it worked correctly. 重新安装并重新设置权限-并重新启动后-它可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AngularJS 2和Cordova:“无法加载资源:net :: ERR_FILE_NOT_FOUND” - AngularJS 2 and Cordova: “Failed to load resource: net::ERR_FILE_NOT_FOUND” 无法加载资源:net::ERR_FILE_NOT_FOUND 离子错误 - Failed to load resource: net::ERR_FILE_NOT_FOUND ionic error Phonegap/Cordova 应用程序错误网络::ERR_FILE_NOT_FOUND - Phonegap/Cordova Application Error net::ERR_FILE_NOT_FOUND 科尔多瓦网::ERR_FILE_NOT_FOUND(file:///android_assets/www/) - Cordova net::ERR_FILE_NOT_FOUND(file:///android_assets/www/) 加载资源失败:net::ERR_CONNECTION_REFUSED Cordova android - Failed to load resource: net::ERR_CONNECTION_REFUSED Cordova android Cordova Android 无法加载资源:.net::ERR_NAME_NOT_RESOLVED - Cordova Android Failed to load resource: net::ERR_NAME_NOT_RESOLVED 正在获取ERR_FILE_NOT_FOUND - Getting ERR_FILE_NOT_FOUND Android Studio(网页帮助)网:ERR_FILE_NOT_FOUND - Android Studio (Web page help) net : ERR_FILE_NOT_FOUND 科尔多瓦| ERR_FILE_NOT_FOUND(文件:///android_assets/www/index.html) - Cordova | ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html) Sencha Cordova Android ERR_FILE_NOT_FOUND(与sencha Web目录一起部署在tomcat实例上的API) - Sencha Cordova Android ERR_FILE_NOT_FOUND (API deployed on tomcat instance along with sencha web dir)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM