gpt4 book ai didi

android - Android Studio Gradle构建错误:app:mergeDebugResources,处理Cruncher loader.png失败

转载 作者:行者123 更新时间:2023-12-03 04:46:24 24 4
gpt4 key购买 nike

我正在尝试将Google Signin集成到我的Android应用中。当包含Google Services Dependencies时,我在构建apk时遇到问题。以下是我的gradle文件和错误日志。谷歌服务库也提示我使用gradle-wrapper 2.10而不是2.8

项目级别梯度文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:2.0.0-alpha5'
}
}

allprojects {
repositories {
jcenter()
mavenCentral()
}
}

应用级别文件:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.jaldirecharge"
minSdkVersion 9
targetSdkVersion 23
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}

useLibrary 'org.apache.http.legacy'
}

dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.mcxiaoke.volley:library:1.0.6'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services-auth:8.3.0'
compile files('libs/gcm.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/socialauth-4.3.jar')
compile 'com.facebook.android:facebook-android-sdk:4.9.0'
compile files('libs/socialauth-android-3.0.jar')
compile files('libs/universal-image-loader-1.8.3.jar')
}

错误日志:
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk490Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
:app:generateDebugResources
:app:mergeDebugResources

AAPT错误(Facade for 1282826090):未设置代理:丢失的消息:libpng错误:不是PNG文件
AAPT错误(Facade for 1543523483):未设置代理:丢失消息:libpng错误:不是PNG文件
AAPT:libpng错误:不是PNG文件
AAPT:libpng错误:不是PNG文件
:app:mergeDebugResources失败
错误:任务':app:mergeDebugResources'的执行失败。

Crunching Cruncher loader.png failed, see logs Information:BUILD FAILED Information:Total time: 9.017 secs Information:1 error Information:0 warnings Information:See complete output in console

最佳答案

您可以在build.gradle中将其禁用:

android { 
....
aaptOptions {
cruncherEnabled = false
}
....
}

关于android - Android Studio Gradle构建错误:app:mergeDebugResources,处理Cruncher loader.png失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35320765/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com