关于启动图片 Default.png报错

本文介绍了一种常见的Xcode项目中图片资源格式不匹配导致的问题及解决方案。当尝试将非PNG格式(如JPG)的图片作为默认启动页图片使用时,Xcode会报错。解决方法是确保所使用的图片为正确的PNG格式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

While reading /Users/chenyong05314/Documents/xcode项目/吃货876/准备开始推荐页面/GanChiApp/Default.png pngcrush caught libpng error:   Not a PNG filCould not find file: /Users/chenyong05314/Library/Developer/Xcode/DerivedData/GanChiApp-bdnapozssrekjugezlpaqmbqkhrg/Build/Products/Debug-iphoneos/GanChiApp.app/Default.pngCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure



是因为图片本身不是png格式的(我刚才的是Jpg的),我手动把改成png了(嘿嘿)

解决办法:让美工把原图片改成png格式 的即可

产品大全页面所有的按钮都改成橙色,现有代码中,通过编译后可以跳转到各页面,但过了一秒后自动跳转到开发者工具,但无报错信息,请帮我修复完成后给我完整代码。[Deprecation] SharedArrayBuffer will require cross-origin isolation as of M92, around July 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. [system] WeChatLib: 3.8.9 (2025.6.17 19:09:25) [system] No. of subpackages: 5 [system] LazyCodeLoading: false [wxobs] auto recording mode is not enabled in devtools. [体验分析] 为避免影响调试,开发者工具在非自定义启动模式下不会启动采集。详见 https://dev.weixin.qq.com/docs/analysis/sdk/debugging.html app.js? [sm]:47 小程序初始化完成 {path: "pages/welcome/welcome", query: {…}, scene: 1001, referrerInfo: {…}, mode: "default", …} wx.getSystemInfoSync is deprecated.Please use wx.getSystemSetting/wx.getAppAuthorizeSetting/wx.getDeviceInfo/wx.getWindowInfo/wx.getAppBaseInfo instead. getSystemInfo @ app.js? [sm]:68 onLaunch @ app.js? [sm]:50 (anonymous) @ app.js? [sm]:1 app.js? [sm]:70 系统信息: {batteryLevel: 97, benchmarkLevel: -1, brand: "devtools", memorySize: 2048, model: "iPhone 12/13 (Pro)", …} [Perf] App.getSystemInfo took 1292ms onLaunch @ app.js? [sm]:50 (anonymous) @ app.js? [sm]:1 app.js? [sm]:90 当前环境: develop, API地址: https://dev-api.lyqf.com app.js? [sm]:118 用户未登录 app.js? [sm]:156 开发环境自动跳转至首页 [Perf] App.onLaunch took 1360ms (anonymous) @ app.js? [sm]:1 app.js? [sm]:142 小程序切前台 {path: "pages/welcome/welcome", query: {…}, scene: 1001, referrerInfo: {…}, mode: "default", …} [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M92, around July 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. [Perf] App.smartNavigateTo took 51ms (anonymous) @ app.js? [sm]:161 setTimeout (async) handleDevRedirect @ app.js? [sm]:159 onLaunch @ app.js? [sm]:62 (anonymous) @ app.js? [sm]:1 [system] Launch Time: 8480 ms [自动热重载] 已开启代码文件保存后自动热重载 app.js? [sm]:383 成功跳转至标签页: /pages/home/home [渲染层网络层错误] Failed to load local image resource /images/location.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/search.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/banner1.jpg the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/banner2.jpg the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/banner3.jpg the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/banner4.jpg the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/enterprise.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/individual.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/company.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/personal.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/worker.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/farmer.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/edu.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/house.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/car.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/product/clue.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/service/incubation.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/service/tech.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/service/loan.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/service/assets.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/service/finance.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/service/ecommerce.png the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/news1.jpg the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [渲染层网络层错误] Failed to load local image resource /images/news2.jpg the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error) (env: Windows,mp,1.06.2503300; lib: 3.8.9) [自动热重载] 已开启代码文件保存后自动热重载 login.js? [sm]:58 开发环境跳转中... [自动热重载] 已开启代码文件保存后自动热重载 app.js? [sm]:383 成功跳转至标签页: /pages/home/home [worker] reportRealtimeAction:fail not support
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值