Apache Cordova:“无法加载资源:服务器响应状态为404(找不到)”。

编程入门 行业动态 更新时间:2024-10-11 15:25:10
本文介绍了Apache Cordova:“无法加载资源:服务器响应状态为404(找不到)”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我收到错误:无法加载资源:服务器使用javascript文件中的图标文件回应了状态404(找不到)。

I am getting error: "Failed to load resource: the server responded with a status of 404 (Not Found)" with icon file in javascript file.

var image = { url: "green.png", size: new google.maps.Size(20, 32), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(0, 32) }; var marker = new google.maps.Marker({ position: { lat: latitude, lng: longitude }, map: map, icon: image, title: "" });

我使用Visual Studio 2015与Apache Cordova。

I am using Visual Studio 2015 with Apache Cordova.

文件位于www / scripts / googlemap.js和www / scripts / green.png。

Files are located in www/scripts/googlemap.js and www/scripts/green.png.

编辑: 主要问题是来源。网址应为/scripts/green.png或scripts / green.png。我认为我之前尝试过,但不能让那些工作的原因。

Main problem was source. Url should be /scripts/green.png or scripts/green.png. I thought I tried these before but didn´t to get those working for some reason.

推荐答案

我没有使用任何插件。基本的JavaScript google地图与API。

I am not using any plugin. Basic javascript google maps with API.

我已经回答了我的第一篇文章,但问题是来源。网址应为/scripts/green.png或scripts / green.png。我以为我以前尝试过这些,但是没有得到那些工作的原因。

I already answered into my first post but the problem was source. Url should be /scripts/green.png or scripts/green.png. I thought I tried these before but didn´t to get those working for some reason.

有时在Visual Studio Rebuild不工作。首先要做清洁,而不是做。也许这是第一次的问题。不知道。但一切工作现在顺利!

Sometimes in Visual Studio Rebuild won´t work. Have to do first clean and than build. Maybe that was the problem for the first time. Dunno. But everything works now smoothly!

更多推荐

Apache Cordova:“无法加载资源:服务器响应状态为404(找不到)”。

本文发布于:2023-08-03 04:37:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1284012.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   加载   状态   服务器   资源

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!