Sum*_*mit 0 android gradle gradlew android-gradle-plugin gradle-plugin
我正在尝试将Google Signin集成到我的Android应用中.当我包含Google Services Dependencies时,我面临着构建apk的问题.下面是我的gradle文件和错误日志.谷歌服务lib也提示我使用gradle-wrapper 2.10而不是2.8
PROJECT LEVEL GRADLE FILE:
// 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()
}
}
Run Code Online (Sandbox Code Playgroud)
APP LEVEL GRADLE文件:
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')
}
Run Code Online (Sandbox Code Playgroud)
错误日志:
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
Run Code Online (Sandbox Code Playgroud)
AAPT错误(Facade for 1282826090):No Delegate set:lost message:libpng error:not a PNG file AAPT err(Facade for 1543523483):No Delegate set:lost message:libpng error:not a PNG file AAPT:libpng error:Not一个PNG文件AAPT:libpng错误:不是PNG文件:app:mergeDebugResources FAILED错误:任务':app:mergeDebugResources'的执行失败.
Crunching Cruncher loader.png失败,请参阅日志信息:BUILD FAILED信息:总时间:9.017秒信息:1错误信息:0警告信息:在控制台中查看完整输出
小智 7
您可以在build.gradle中禁用它:
android {
....
aaptOptions {
cruncherEnabled = false
}
....
}
Run Code Online (Sandbox Code Playgroud)
沙哈尔给出了正确答案,只有我想加入的是 -
我的项目中有100多个图像并且检查每个图像是不可能的,所以我所做的是使用工具一次转换PNG中的所有图像.我是MAC用户所以我使用预览应用程序.我发现其中一个图像保存为PNG但不保存为png文件.
| 归档时间: |
|
| 查看次数: |
9909 次 |
| 最近记录: |