在导入项目到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. WIFEXITED WEXITSTATUS WIFSIGNALED(转)

    wait的函数原型是: #include #include pid_t wait(int *status) 进 程一旦调用了wait,就立即阻塞自己,由wait自动分析是否当前进程的某个子进程已经退出 ...

  2. 【Android】Android 8种对话框(Dialog)

    1.写在前面 Android提供了丰富的Dialog函数,本文介绍最常用的8种对话框的使用方法,包括普通(包含提示消息和按钮).列表.单选.多选.等待.进度条.编辑.自定义等多种形式,将在第2部分介绍 ...

  3. 【C#】C#创建Windows Service服务

    目录结构: contents structure [+] 创建Windows服务 配置 安装Windows服务 在Visual Studio中调试 常见问题 最近写了一个TCP连接的程序,由于这种通信 ...

  4. 【java】深入了解JAVA可变长度的参数

    到J2SE 1.4为止,一直无法在Java程序里定义实参个数可变的方法——因为Java要求实参(Arguments)和形参(Parameters)的数量和类型都必须逐一匹配,而形参的数目是在定义方法时 ...

  5. 简单获取cpu使用率,以及后台运行的问题

    做了一个运维平台,有一个功能定时执行一个脚本,获取cpu使用率和内存使用情况到监控平台. 获取cpu使用率使用的是top中的信息.直接运行没有问题.通过nohup xxx.sh & 之后获取不 ...

  6. easyUI设置textbox的值

    我们知道<input type="text" class="easyui-validatebox" id="txtrName" nam ...

  7. Oracle VPD策略示例

    1.未创建前使用oe用户登录查询: SQL> select * from orders; ORDER_ID ORDER_DATE ORDER_MO CUSTOMER_ID ORDER_STATU ...

  8. LINUX-iostat命令讲解

    语法如下:iostat [ -c | -d ] [ -k ] [ -t ] [ -V ] [ -x [ device ] ] [ interval [ count ] ]-c为汇报CPU的使用情况:- ...

  9. app-framework学习--官网地址及demo下载地址

    一起学习共同进步,加油..! 官网地址:http://app-framework-software.intel.com/ 下载地址:http://download.csdn.net/detail/ha ...

  10. 【Qt】StackedWidget

    一个简单的堆栈窗体类: 左側列表框会出现不同的选项,右側显示所选的不同的窗口 #include<QHBoxLayout> #include "stackdlg.h" S ...