Reputation: 803
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?
Adnroid stuidio : ver 2.2.3
Gradle : ver 3.2 (use local)
Settings (Build, Execution, Deployment)
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" }
Upvotes: 15
Views: 13509
Reputation: 852
Delete root .build and .idea directories. Make project again solved this problem. However it took me 24 mins to build the project.
Upvotes: 5
Reputation: 1016
I fixed this issue by deleting the .gradle/ directory in the project dir and kicking off a new build.
Upvotes: 14
Reputation: 16920
Deleting the build/
directory in my project root and the build/
directory of all my modules solved it.
Upvotes: 1
Reputation: 803
Complete uninstall Android studio
I didn't find any solution or not work for me.
So I uninstall all Android studio resource refer to upper link. And reinstall Android studio not contain SDK. (SDK install manually)
Upvotes: 0
Reputation: 1
Seems to be fixed in Studio 2.3 Beta 1.
In my specific scenario invoking ./gradlew :app:installDebug
once after switching flavors fixed the issue temporarily.
Upvotes: -1