libpng error: Not a PNG file Error Showing In Android Studio

后端 未结 8 2097
悲哀的现实
悲哀的现实 2020-11-27 05:20

I just Imported a project from Eclipe to Android Studio. Just a plain and simple project. But the project folder is showing one error .

May I know what

相关标签:
8条回答
  • 2020-11-27 05:53

    If you are using Mac OS, follow the steps below to get a png

    1. Open image in preview
    2. Go to file -> Export
    3. Set format as png
    4. Click on save

    This will give you a valid png

    Mere renaming or changing extension won't work in Mac OS.

    0 讨论(0)
  • 2020-11-27 06:02

    You should follow below steps.

    1. Cut-paste the image on my desktop.

    2. Opened it in an editor saved it as png. without renaming the file name.

    3. Copy-pasted the .png image into the drawable folder.

    You can use cruncherEnabled.

    Returns true if the PNGs should be crunched, false otherwise.

    android 
    { 
       aaptOptions
       {
       cruncherEnabled = false
       } 
    }
    

    Hope this helps you.

    0 讨论(0)
提交回复
热议问题