我试图将compileSdkVersion和targetSdkVersion从25升级到27并且无法删除路径错误发生:
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’.
每次我清除缓存它发生在不同的目录/文件
compileSdkVersion 25
buildToolsVersion "26.0.2"
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
dependencies {
...
compile 'com.android.support:appcompat-v7:25.3.1'
...
}
在Project build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
降级后它不起作用!
>清洁/重建项目
>使缓存无效并重新启动
> Clear Grade Cache:rm -rf .gradle / caches /和./gradlew cleanBuildCache
>手动删除biuld目录
>手动删除.gradle目录
最佳答案