我在Debian Jessie上安装了带有必要软件包的Android Studio 2.2.2并检查更新
当gradle构建开始时我有2个错误:
错误:java.lang.RuntimeException:Crunching Cruncher launcher.png失败,请参阅日志错误:任务':app:mergeDebugResources'的执行失败.
我在这个论坛上寻找答案,我试图通过编辑/ res/drawable文件夹中的png文件来解决这个错误.我使用了Pinta图像编辑器并将文件保存为launcher.png
我还检查了gradle.build文件并确保其中显示的SDK构建工具版本持续版本(25.0.0)
模块gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 10
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.project.project"
minSdkVersion 10
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile files('libs/httpmime-4.0.jar')
}
Run Code Online (Sandbox Code Playgroud)
项目级gradle文件
// 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:2.2.2'
}
}
allprojects …Run Code Online (Sandbox Code Playgroud) java android android-studio build.gradle android-gradle-plugin