无法在android studio中创建项目

时间:2017-10-01 05:40:59

标签: android android-studio android-gradle build.gradle

错误:无法创建目录'D:\ rw_apps \ MyApplication \ app \ build \ generated \ source \ r \ debug \ com \ example \ bhavin \ myapplication'

错误:java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.AaptException:AAPT2链接失败:

错误:com.android.builder.internal.aapt.AaptException:AAPT2链接失败:

  

错误:任务':app:processDebugResources'的执行失败。   无法执行aapt

我从其他stackoverflow的答案中尝试了很多解决方案 干净的项目, 重启android工作室, 改变构建工具, 重新下载构建工具。

  

使用--stacktrace运行时很长,所以我要分享文本文件check

     

我正在使用android studio 3.0 beta 6.

我的gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
}

1 个答案:

答案 0 :(得分:0)

android.enableAapt2=false文件中设置gradle.properties