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

PhoneGap Build构建失败:config.xml指定图标缺失问题求助

Fixing "Icon specified in config.xml could not be found" on PhoneGap Build

Hey there, let's work through this error you're facing. I've run into this exact issue multiple times when using PhoneGap Build, so here are targeted fixes to try:

Common Troubleshooting Steps

1. Validate Path Casing and Exact Filenames

PhoneGap Build runs on a Linux environment, which is case-sensitive for file paths. Even a tiny mismatch (like Resources vs resources or Drawable-ldpi-icon.png vs drawable-ldpi-icon.png) will cause the build to fail.

  • Open the zip file you're uploading to PhoneGap Build
  • Navigate to resources/android/icon/ and confirm every file listed in your config exists with the exact name (e.g., drawable-ldpi-icon.png is present, no typos)
  • Do the same for the splash screen files—your config snippet cuts off, but ensure all <splash> entries point to existing files

2. Check Zip Package Structure

The root of your uploaded zip must contain your config.xml and the resources folder directly. If you zipped a parent folder (e.g., all your app files are inside a my-project folder), PhoneGap Build will look for my-project/resources/... instead of resources/..., which breaks the paths.

Correct structure example:

my-app.zip/
├─ config.xml
├─ resources/
│  ├─ android/
│  │  ├─ icon/
│  │  │  ├─ drawable-ldpi-icon.png
│  │  │  ├─ ... (other icons)
│  │  ├─ splash/
│  │  │  ├─ drawable-port-hdpi-screen.png
│  │  │  ├─ ... (other splashes)
├─ www/
│  ├─ ... (your app code)

3. Remove Hidden System Files

Hidden files like .DS_Store (Mac) or Thumbs.db (Windows) can sometimes interfere with PhoneGap Build's file detection.

  • Delete all hidden files from your resources folder and subfolders
  • Re-zip your app files from scratch, making sure only necessary files are included

4. Test with a Minimal Config

To isolate the issue, create a simplified config.xml with just the Android icon entries (temporarily remove all splash screen lines) and try building again. If it succeeds, add the splash entries one by one to find which file/path is causing the error.

Your Config Reference

For context, here's the Android platform config you shared (formatted):

<platform name="android">
    <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
    <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
    <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
    <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
    <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
    <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
    <splash src="resources/android/splash/drawable-port-hdpi-screen.png" />
    <splash qualifier="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
    <splash qualifier="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
    <splash qualifier="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
    <splash qualifier="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
    <splash qualifier="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
    <splash qualifier="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
    <splash qualifier="port-ldpi" src="resources/a...

And the error you're seeing:

Error - An icon specified in your config.xml could not be found. Make sure all icons specified in your config.xml exist in your app package.

Start with the path validation and zip structure checks—those are the most common culprits. Let me know if any of these steps resolve your issue!

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 03:53:40