美文网首页
Error: Execution failed for task

Error: Execution failed for task

作者: firfox | 来源:发表于2017-03-30 15:13 被阅读0次

项目编译的时候经常性的遇到这个问题今天就特地的搜索了一下:

I'm trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw anUnableToDeleteFileExceptionduring the cleaning/rebuilding process:

Execution failed for task ':app:clean'.

> Unable to delete file: C:\Users\User\KotlinGameEngine\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\jars\classes.jar

This started happening after I tried to change my project's package

structure. Unfortunately, I did it by renaming and moving the source

folders rather than refactoring through Android Studio, which was a bad

idea.

答案如下:

1.Doing a Gradle sync;

2.Reinstalling Java JRE and Java SDK;

3.Reinstalling the latest version of Android Studio (1.4);

4.Rolling back to the previous AS version (1.3);

5.Invalidating the AS cache and restarting;

6.Deleting the gradle and .gradle directories in the project directory;

7.Deleting the.gradle directory in my user directory;

8.Running gradlew clean  from the AS terminal;

Manually copying the sources over to a new project (weird that it somehow persists across projects...)

我一般都会用678 三种的其中一个今天特此记录

相关文章

网友评论

      本文标题:Error: Execution failed for task

      本文链接:https://www.haomeiwen.com/subject/tyjgnttx.html