Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Gradle Build Error java.io.IOException Could not delete path

I tried to upgrade compileSdkVersion And targetSdkVersion From 25 to 27 And Could not delete path Error Happened :

Error:Execution failed for task ':app:mergeFlavorPublicDebugResources'. java.io.IOException: Could not delete path '/home/username/Android/projects/Pouya/app/build/intermediates/res/merged/flavorPublic/debug/values-ja/values-ja.xml'.

Every time i clear cache it happened for different directories / files

compileSdkVersion 25
buildToolsVersion "26.0.2"
defaultConfig {
    vectorDrawables.useSupportLibrary = true
}

dependencies {
    ...
    compile 'com.android.support:appcompat-v7:25.3.1'
    ...
}

At Project build.gradle :

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
}

it not works even after Downgrade!

Some ways not Solved problem :

  • Clean / Rebuild project
  • Invalidate cache and restart
  • Clear Grade Cache : rm -rf .gradle/caches/ And ./gradlew cleanBuildCache
  • Delete biuld directory manually
  • Delete .gradle directory manually
like image 567
Hossein Kurd Avatar asked Nov 26 '17 11:11

Hossein Kurd


1 Answers

Have you try to delete this folder : /home/username/Android/projects/Pouya/app/build ?

like image 70
pvarry Avatar answered Oct 17 '22 22:10

pvarry