Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译报Error:Execution failed for task ':app:transformClassesWith___ReClass___ForDebug'. > java.io.IOException: Unable to delete directory #377

Open
lesterLau opened this issue Sep 29, 2017 · 14 comments

Comments

@lesterLau
Copy link

lesterLau commented Sep 29, 2017

问题详细描述 Detailed description of the problem

编译的时候报删除文件错误

复现问题步骤 Steps to reproduce the problem

  1. 删除所有build文件,第一次编译没有问题,等编译成功生成build文件之后,再次调用build project直接报错Error:Execution failed for task ':app:transformClassesWith___ReClass___ForDebug'.

java.io.IOException: Unable to delete directory E:\tangzi\warwolf\android\TaoKeForward\app\build\intermediates\exploded-aar\5deb1c5ee778c75e8464f980db304913bf8e99e5\class\com\alibaba\baichuan\trade\common.
编译失败,必须得重新删除build文件再次build

其它重要信息 Other important information

replugin-host-lib/gradle Version:2.2.0
rePlugin-plugin-lib/gradle Version:2.2.0

Android API Version:
Android 手机型号&ROM(Phone model & ROM): 魅族

Logcat上下文 Logcat context

插件

@cundong
Copy link
Contributor

cundong commented Sep 30, 2017

把 java 进程kill掉再试试呢

@lesterLau
Copy link
Author

试过没用,这个应该跟java进程没关系

@chenchaoqingtian
Copy link

不知道你是不是在build.gradle添加脚本把生成apk名改了,如果是的,把这段脚本注释掉应该就可以了

@hdheyou
Copy link

hdheyou commented Mar 14, 2018

我遇到过,并成功解决了问题。原因是compileOptions的参数不能设置成JavaVersion.VERSION_1_8,改成7就好了。希望官方能兼容8,毕竟现在越来越普及8了。

@Hidderr
Copy link

Hidderr commented May 25, 2018

我也反复出现这个问题,按照上面几位提出的方案尝试了一下,还是偶尔能够打包成功,其他情况总是打包失败,请问如何解决?谢谢

@taoszu
Copy link

taoszu commented Aug 15, 2018

我也出现了这个问题,官方什么时候修复啊

@Hidderr
Copy link

Hidderr commented Aug 15, 2018

你删除build文件夹,并且不要关联git,然后重启studio,我的就是这样解决的

@taoszu
Copy link

taoszu commented Aug 16, 2018

我还是不行啊

@CTO1987
Copy link

CTO1987 commented Sep 13, 2018

我解决了,太开心了,是因为TortoiseGit status cache的问题,每次生成时,把他给终止了就好了,开心Ing,谢谢@cundong 大老的提示,他说把java关掉,我就觉得有人在动文件了
每次生成时,TortoiseGit status cache都会启动,我把他关掉,生成就快了

@CTO1987
Copy link

CTO1987 commented Sep 13, 2018

找到谁在你生成时,启动线程,和你的项目有关的,把他关了,因为他可能在调用你生成的文件

@CTO1987
Copy link

CTO1987 commented Sep 13, 2018

我生成时,不结束TortoiseGit status cache,会出现Unable to delete directory D:\NiuGou-android\MyRePlugin\plugins\login\app\build\intermediates\exploded-aar\8536cda0b32e69782e48b8fcff33b1a001f8dd2f\class\android\support\v4.
,关闭后,就生成成功了

@Hidderr
Copy link

Hidderr commented Sep 13, 2018

@taoszu 实在不行,就新建文件夹,把工程迁移进去,我试过也是可以的

@asdf19910719
Copy link

虽然很蛋疼,也说下我的情况,和插件在一起的还有一个项目,然后每次我都rebuild,导致每次另一个项目都编译不通过,我还以为是插件项目的问题..

@sanren1024
Copy link

在2.3.3版本中jdk 1.8编译,在AS里边可以编译通过,但是通过jenkins上的环境相同的环境就不行了。

Error:Execution failed for task ':app:transformClassesWith___ReClass___ForDebug'. > java.io.IOException: Unable to delete file...

能有什么解决方案吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants