在导入项目到Android studio后,若编译出现“AAPT err(Facade for): libpng error: Not a PNG file”错误。

该错误表示项目中的drawable下的图片文件有非png图片,命名为了png造成的。

解决方案:

方案一、在模块下的build.gradle中配置下面两个信息,再clear project。

aaptOptions.cruncherEnabled = false
      aaptOptions.useNewCruncher = false

 

方案二、在android studio中,依次点开后缀为png的图片,可以查看到图片的文件信息,如下图,将不为png的图片另存为png图片或者修改图片后缀为对应的图片格式。

AAPT err(Facade for): libpng error: Not a PNG file 错误解决的更多相关文章

  1. [Android]libpng error: Not a PNG file错误解决

    我在将以前在Eclipse中写的项目import到android studio中后,出现了 AAPT err(Facade for 157667509): libpng error: Not a PN ...

  2. AAPT: libpng error: Not a PNG file 问题解决

    导入项目到Android Studio的时候,Gradle Build失败了,报的错是 FAILURE: Build failed with an exception. Execution faile ...

  3. Androoid studio 2.3 AAPT err(Facade for 596378712): \\?\C:\Users\中文文件夹\.android\build-cache

    错误如下: Error:Some file crunching failed, see logs for details Error:Execution failed for task ':app:m ...

  4. pngcrush caught libpng error: Not a PNG file..

    今日真机测试遇到这样的奇葩问题: While reading XXX/XXX.png pngcrush caught libpng error: Not a PNG file.. 替换几次图片都没解决 ...

  5. Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法

    Eclipse 出现Some sites could not be found.  See the error log for more detail.错误 解决方法 Some sites could ...

  6. While reading xxx.png pngcrush caught libpng error: Not a PNG file..

    While reading /XXX/XXX/XXX/img1.png pngcrush caught libpng error: Not a PNG filCould not find file: ...

  7. LINK : fatal error LNK1104: cannot open file的解决方法

    结果是编译时通过了,但连接(F7)时却显示: LINK : fatal error LNK1104: cannot open file“Debug/1.exe” ============== 上一次运 ...

  8. Windows登录服务器CLI运行脚本出现 syntax error: unexpected end of file 错误的解决

    0.前言 通常我们在编辑 Linux 服务器上的文件时,直接在 Linux 环境比较麻烦(当然熟练使用 VIM 的程序员除外哈哈),有时我们会使用 Windows 将文件编辑好再上传到服务器端,我用的 ...

  9. npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法

    npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_mod ...

随机推荐

  1. C#项目中引入app.manifest管理员权限运行

    原文地址:https://blog.csdn.net/qq395537505/article/details/51010962 参考UAC:User Account Control 参考IE保护模式: ...

  2. rhel 7 设置默认运行级别为图形

    查看默认级别 # systemctl get-default multi-user.target # cat /etc/inittab # inittab is no longer used when ...

  3. C++的坑真的多吗?

    先说明一下,我不希望本文变成语言争论贴.希望下面的文章能让我们客观理性地了解C++这个语言.(另,我觉得技术争论不要停留在非黑即白的二元价值观上,这样争论无非就是比谁的嗓门大,比哪一方的观点强,毫无价 ...

  4. MySQL经常使用技巧

    建表 每一个表都有一个id字段,最好为UNSIGNED.如 INT(9) UNSIGNED NOT NULL 在表使用一段时间后,使用PROCEDURE ANALYSE得到建议,如select * f ...

  5. RecylerView 的使用方法

    package com.cardvalue.sys.fragment; import android.content.Intent; import android.net.Uri; import an ...

  6. Python 文件 next() 方法

    描述 Python 3 中的 文件 对象不支持 next() 方法. Python 3 的内置函数 next() 通过迭代器调用 __next__() 方法返回下一项. 在循环中,next()方法会在 ...

  7. stm32定时器PWM模式和输出比较模式

    pwm模式是输出比较模式的一种特例,包含于输出比较模式中 /** @defgroup TIM_Output_Compare_and_PWM_modes * @{ */ #define TIM_OCMo ...

  8. [转]PostgreSQL教程(十六):系统视图详解

    这篇文章主要介绍了PostgreSQL教程(十六):系统视图详解,本文讲解了pg_tables.pg_indexes.pg_views.pg_user.pg_roles.pg_rules.pg_set ...

  9. 收集一些有意思的ASCII程序注释(持续收集中,希望大家踊跃贡献)

      /** * * created by Mr.Simple, Aug 21, 20141:51:40 PM. * Copyright (c) 2014, hehonghui@umeng.com Al ...

  10. MySQL 示例数据库 employees 详解

    [引子] IT这一行在我看来是比较要求动手能力的,但是人非生而知之:人们身上的技能除了一些本能之外,大多都是通过学习而得到的. 前一段时间一直在整理素材,写一个关于explain 的系列文章:在一开始 ...