Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does mean "specified for property 'resDir' does not exist."

When I build my project. Gradle result is underblock (I'm using data binding in some code)

Error:A problem was found with the configuration of task ':app:processDebugAndroidTestResources'.> Directory 'C:\Users\user\Desktop\"My project loaction"\app\build\intermediates\data-binding-layout-out\androidTest\debug' specified for property 'resDir' does not exist.

I' try many method (ex: gradle setting, Android stdio setting reset, disable instant run, make just empty directory). but this method is not work for me. Is any Idea of solution?

My env

Adnroid stuidio : ver 2.2.3

Gradle : ver 3.2 (use local)

Settings (Build, Execution, Deployment)

  • Complier : All 4 check box checked
  • Instant Run : 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"
    }

like image 689
BlueBright Avatar asked Dec 21 '16 02:12

BlueBright


1 Answers

I fixed this issue by deleting the .gradle/ directory in the project dir and kicking off a new build.

like image 105
Taskmaster Avatar answered Sep 28 '22 07:09

Taskmaster