2016-03-02 72 views
1

在Windows 7上使用的Android 1.5.1工作室,並gradle這個2.8或2.10,我嘗試運行gradle這個乾淨(使用木材只有當),當出現以下錯誤:搖籃清潔失敗,因爲棉絨和木材

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的電話沒有控制)的控制。

謝謝!

+0

我不斷收到相同的錯誤,並且Unlocker手動刪除文件:/ –

回答

2

禁用所有木材的皮棉檢查,在的build.gradle:

android { 

    lintOptions { 
    disable 'LogNotTimber', 'StringFormatInTimber', 'ThrowableNotAtBeginning', 'BinaryOperationInTimber', 'TimberArgCount', 'TimberArgTypes', 'TimberTagLength' 
    } 
} 

我也建議提交能解決這個問題,使你的PR可以打開這些檢查。你不想無限期地壓制這些。

0

從降級的4.XX木材3.1.0

+0

顯然,Phiter :) 並且無法降級,需要4.x版本。 – Wicha