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

Android Studio中Manifest未识别图标资源问题求助

Troubleshooting "mipmap/ic_launcher not found" Error

Hey there, let's work through this launcher icon issue together—this is a super common snag, so we'll get it sorted quickly!

Here are the most likely fixes to try, in order of simplicity:

  • Double-check your mipmap files and folders
    Make sure your res/mipmap-* folders (like mipmap-mdpi, mipmap-hdpi, etc.) actually contain an icon file named ic_launcher (either .png or a vector .xml file). Remember: Android resource names are case-sensitive, so IC_Launcher or ic_launcher_ won't match. You don't need every density folder filled, but at least one valid icon in a mipmap folder is required.

  • Verify your Manifest reference
    Open your AndroidManifest.xml and check the <application> tag's android:icon attribute. It should exactly match your resource name:

    <application
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        <!-- other attributes -->
        >
        <!-- app components -->
    </application>
    

    Watch out for typos—like writing @drawable/ic_launcher instead of @mipmap/ic_launcher, or misspelling the icon filename.

  • Clean and rebuild your project
    Android Studio's cache can sometimes hold onto old or incorrect resource data. Head to the top menu:

    1. Click Build > Clean Project
    2. Once that finishes, click Build > Rebuild Project
      This forces the IDE to recompile all resources from scratch, which often fixes "missing resource" false positives.
  • Check for corrupted or invalid resource files
    If you're using a vector asset (ic_launcher.xml), open it up and make sure there are no syntax errors (like unclosed tags or invalid attributes). If it's a bitmap, confirm the image file isn't corrupted—try opening it in an image viewer to be sure.

  • Validate your module's resource path configuration
    Open your app module's build.gradle file (not the root project one) and check that the sourceSets section points to your correct res folder:

    android {
        sourceSets {
            main {
                res.srcDirs = ['src/main/res']
            }
        }
    }
    

    If this path is wrong, the IDE won't be able to find any of your resources, including the launcher icon.

If none of these work, you can try deleting the .idea folder and build folder in your project, then re-importing the project into Android Studio—this clears out all cached data and starts fresh.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.20 10:05:20