更新android studio从v-1.5到v-2.1.1时显示libpng错误?

时间:2016-05-17 13:36:27

标签: android android-studio build.gradle aapt

当我更新android studio时,我在同步项目时发现了以下异常:

 Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72321Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2321Library UP-TO-DATE
:app:prepareComBraintreepaymentsApiBraintree178Library UP-TO-DATE
:app:prepareComBraintreepaymentsApiBraintreeApi178Library UP-TO-DATE
:app:prepareComBraintreepaymentsCardForm201Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidAnswers136Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidBeta114Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidCrashlytics255Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidCrashlyticsCore238Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:app:prepareComPaypalSdkPaypalPartnerAndroidSdk2125Library UP-TO-DATE
:app:prepareDealiciCopyFacebookAndroidSdk481UnspecifiedLibrary UP-TO-DATE
:app:prepareIoFabricSdkAndroidFabric1310Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:fabricGenerateResourcesDebug
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
AAPT err(Facade for 2185542): libpng error: Not a PNG file
AAPT err(Facade for 7312816): libpng error: Not a PNG file
AAPT err(Facade for 7312816): libpng error: Not a PNG file
Error:Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
Information:BUILD FAILED
Information:Total time: 11.546 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

我尝试重启android并将所有文件更改为.png格式。但是例外没有解决。

请尽快给我解决问题的完美解决方案?

1 个答案:

答案 0 :(得分:0)

检查res / drawable目录中的所有图像是否与PNG格式不同。 即使图片的扩展名为.png,也不意味着它是PNG文件。