在 Windows 7 上使用 Android Studio 1.5.1 和 gradle 2.8 或 2.10,尝试运行 gradle clean 时出现以下错误(仅在使用 Timber 时):
gradle clean
Incremental java compilation is an incubating feature.
WARNING [Project: :app] To shrink resources you must also enable ProGuard
:clean
:app:clean FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:clean'.
> Unable to delete file: C:\blabla\app\build\intermediates\exploded-aar\com.jakewharton.timber\timber\4.1.0\jars\lint.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
发现这个:
https
://code.google.com/p/android/issues/detail?id=190812
和那个:
http
://bugs.java.com/bugdatabase/view_bug.do?bug_id=5041014
但对于 Android Studio & gradle,我们无法控制编译(因此无法控制 URLClassLoader 调用)。