how to fix 23.0.1\aapt.exe'' finished with

2020-02-01 06:59发布

All of a sudden I cannot get Gradle to build any projects under Android Studio.

Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '\Local\Android\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1

My Gradle is

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.marathon.simplelist"
        minSdkVersion 8
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
}

Even if I create a new Blank Activity project I still get this error.

I have Android Studio 1.3.1 installed with

SDK Platforms: 5.X, 5.1, 5.0, 4.4, 2.3.3 SDK Tools: SDK Build Tools, SDK Tools 24.4, Platform-Tools 23.0.1

Obviously something is reconfigured locally since even a new empty project will not build. Ideas on how I can resolve this?

标签: android
27条回答
ら.Afraid
2楼-- · 2020-02-01 07:19

in my case: I create new cordova project, then this aapt close in android studio, then i just update SDK Build Tools to 23.0.3 latest version. make sure you have installed MinSdkVersion & targetSdkVersion in android default 'sdk/build-tools' folder

查看更多
相关推荐>>
3楼-- · 2020-02-01 07:20

this error happened when you delete any resource as image which is used in any file the android studio rise this error

the solution

Build -> clean project Build -> rebuild project

good luck

查看更多
老娘就宠你
4楼-- · 2020-02-01 07:22

see gradle console output,

in my case - :app:processDemoReleaseResources FAILED

it was cyrillic file name in asset folder

查看更多
小情绪 Triste *
5楼-- · 2020-02-01 07:22

You may miss the some resources.

You can find the exact problem using following steps

  1. Click -> gradle (right side)

  2. Goto app-> Tasks -> build -> assembleDebug

  3. Double click assembleDebug

You will get the exact error. you can fix your problem

enter image description here

查看更多
再贱就再见
6楼-- · 2020-02-01 07:23

I also faced similar problem, got it fixed by disabling "Instant Run" option,

File>Settings>Build,Execution,Deployment>Instant Run Under Instant Run tab, disable "Enable Instant Run to hot swap code.." enter image description here

查看更多
迷人小祖宗
7楼-- · 2020-02-01 07:24

installing latest SDK/build-tool helps me.

查看更多
登录 后发表回答