libpng的错误:没有一个PNG文件错误显示在Android的工作室 [英] libpng error: Not a PNG file Error Showing In Android Studio

查看:209
本文介绍了libpng的错误:没有一个PNG文件错误显示在Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是进口从 Eclipe到Android工作室的项目。只需一个简单明了的项目。但是,项目文件夹是显示错误。

我想知道什么是达到我的目标,正确的方法是什么?我是新的Andr​​oid的工作室.Does任何人符合这个问题?任何帮助将是很大的AP preciated。

下面是的logcat

 执行失败的任务:应用程序:mergeDebugResources。
>错误:无法运行命令:
    /home/amiya/android-studio/sdk/build-tools/android-4.4.2/aapt小号-i /home/amiya/vola/app/src/main/res/drawable-mdpi/call.png -o /家用/阿米亚·/足底/应用程序/构建/ RES /所有/调试/绘制-MDPI / call.png
  错误code:
    42
  输出:
    libpng的错误:没有一个PNG文件
 

下面是我的 build.gradle

 应用插件:'机器人'

安卓{


    compileSdkVersion 19
    buildToolsVersion19.0.3



    defaultConfig {
        的minSdkVersion 17
        targetSdkVersion 19
    }


    buildTypes {
        推出 {
            runProguard假
            proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'ProGuard的-rules.txt
        }
    }



}

依赖{
    编译com.android.support:appcompat-v7:+
    编译com.android.support:support-v4:+
    编译com.google.android.gms:播放服务:+
    编译文件(库/谷歌播放services.jar)
    编译文件(库/ livesdk.jar)
}
 

我不是在我的项目使用该名称使用此文件的任何地方!有在我的项目许多其他PNG文件虽然。

解决方案

接过低于解决我的问题的步骤:

  1. 剪切粘贴的形象在我的桌面

  2. 打开它在编辑器中保存为PNG。不重命名文件 名称

  3. 复制 - 粘贴的PNG图片到绘制文件夹

它帮助我。尝试这种方式,我想这会工作。

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 is the correct way to achieve my objective? I am new in Android-studio .Does any guys meet this issue?Any help would be greatly appreciated.

Here is Logcat :

Execution failed for task ':app:mergeDebugResources'.
> Error: Failed to run command:
    /home/amiya/android-studio/sdk/build-tools/android-4.4.2/aapt s -i /home/amiya/vola/app/src/main/res/drawable-mdpi/call.png -o /home/amiya/vola/app/build/res/all/debug/drawable-mdpi/call.png
  Error Code:
    42
  Output:
    libpng error: Not a PNG file

Here is my build.gradle

 apply plugin: 'android'

android {


    compileSdkVersion 19
    buildToolsVersion "19.0.3"



    defaultConfig {
        minSdkVersion 17
        targetSdkVersion 19
    }


    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }



}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.android.support:support-v4:+'
    compile 'com.google.android.gms:play-services:+'
    compile files('libs/google-play-services.jar')
    compile files('libs/livesdk.jar')
}

I am not using this file anywhere in my project with that name !! There are many other png files in my project though.

解决方案

Took below steps that solved my problem:

  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.

It helped me .Try this way ,I guess it will work .

这篇关于libpng的错误:没有一个PNG文件错误显示在Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆