When I create my project. Gradle result does not work (I use data binding in some code)
Error: A problem was detected with the configuration of the task ': app: processDebugAndroidTestResources'. > The directory 'C: \ Users \ user \ Desktop \ "My project loaction" \ app \ build \ intermediates \ data-binding-layout-out \ androidTest \ debug' specified for the 'resDir' property does not exist.
I try to use many methods (for example: Gradle, installing Android stdio reset, disable instant start, make only an empty directory). but this method does not work for me. Any solution idea?
My env
Adnroid stuidio: ver 2.2.3
Gradle: ver 3.2 (use local)
Settings (build, run, deploy)
- Compliance: All checkboxes are checked.
- Instant start: disable
buildscript {
repositories {
maven {url "https://plugins.gradle.org/m2/"}
}
dependencies {
classpath "gradle.plugin.me.tatarka: gradle-retrolambda: 3.4.0"
}
}
apply plugin: 'com.android.application'
// Can lambda expression in android
apply plugin: "me.tatarka.retrolambda"
android {
compileSdkVersion 23
buildToolsVersion '23 .0.3 '
defaultConfig {
applicationId "My project package name"
minSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
// This code block is adding app version at apk file
applicationVariants.all {variant ->
variant.outputs.each {output ->
output.outputFile = new File (
output.outputFile.parent,
output.outputFile.name.replace (". apk", "- $ {variant.versionName} .apk"))
}
}
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile ('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources false
zipAlignEnabled true
debuggable false
proguardFiles getDefaultProguardFile ('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions
{
encoding = 'windows-1251' // write your encoding here
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled = true
}
}
repositories {
maven {url "https://jitpack.io"}
maven {url "https://repo.eclipse.org/content/repositories/paho-releases/"}
}
dependencies {
compile fileTree (include: ['* .jar'], dir: 'libs')
"Library inclue"
}
source share