You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PC端HTML文件迁移至安卓平板后资源加载失败求助

解决HTML文件迁移安卓平板后资源加载失败问题

将PC端HTML文件迁移到安卓平板后,用Chrome打开HTML能正常显示,但图片、视频等关联资源全部加载失败,提示File not found;Firefox报错显示找不到PC本地路径/C:/Users/Steve/AppData/Local/Microsoft/Windows/INetCache/IE/NVTYO89E/Videos/Chocolate Sheet Cake with Milk Chocolate Frosting.mp4对应的文件。

错误提示

Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.

用到的HTML代码

<div class="item1">
<p class="Names" >Chocolate Sheet Cake </p>
<p class="Names" >with Milk Chocolate Frosting</p>
     <a href="Chocolate Sheet Cake with Milk Chocolate Frosting.html">
     <img src="Pictures/Chocolate Sheet Cake with Milk Chocolate Frosting.jpg" style="width:200px">
</a> 
   <div id="navcontainer" >
    <ul>
    <li><a href="Videos/Chocolate Sheet Cake with Milk Chocolate Frosting.mp4" target="_blank">Video</a></li>
    <li><a href="Recipes/Chocolate Sheet Cake with Milk Chocolate Frosting Recipe.pdf" target="_blank">Recipe</a></li>
    </ul>
   </div>

解决建议

  • 严格匹配目录结构:确保平板上的HTML文件与Pictures、Videos、Recipes文件夹处于同一层级,完全复刻PC端的文件夹布局,不能单独移动HTML文件而忽略资源文件夹。
  • 注意大小写一致性:安卓系统区分文件名和文件夹名的大小写,而Windows不区分。比如PC端的Pictures在平板上不能写成pictures,必须和HTML代码中的路径完全一致。
  • 移除路径中的空格和特殊字符:文件名或路径里的空格可能导致解析错误,建议将文件名改为无空格格式(如ChocolateSheetCakeWithFrosting.mp4),同时同步更新HTML代码里的对应路径。
  • 清理浏览器缓存:Chrome和Firefox可能缓存了旧的PC端路径记录,清理浏览器缓存后重新打开HTML文件。
  • 临时测试绝对路径:若以上方法无效,可尝试使用安卓平板的绝对文件路径(如file:///storage/emulated/0/你的文件夹名/Videos/Chocolate Sheet Cake with Milk Chocolate Frosting.mp4),但此方法仅作测试,不推荐长期使用(存储位置变化会导致路径失效)。

内容的提问来源于stack exchange,提问作者haubest

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 08:10:22