2014-10-09 126 views
2

我想爲我的項目生成lint報告。 所以我的Ubuntu終端上我給了命令lint my_prj_path 但我發現了以下錯誤,沒有找到'lint'命令

No command 'lint' found, did you mean: 
Command 'link' from package 'coreutils' (main) 
Command 'jlint' from package 'jlint' (universe) 
Command 'hlint' from package 'hlint' (universe) 
Command 'line' from package 'util-linux' (main) 
Command 'tint' from package 'tint' (universe) 
Command 'dlint' from package 'dlint' (universe) 
lint: command not found 

可能是其非常基本的問題,但我不能找到一個解決方案。請幫忙。 在此先感謝。

+0

lint位於sdk/tools目錄下。您是否嘗試過 – 2014-10-09 07:42:01

+0

是的,但是在/ tools /,/ platforms /或/ platform-tools/dir中也出現了相同的錯誤 – 2014-10-09 07:45:45

回答

1

lint可爲/sdk/tools/。所以你需要去lint目錄或在lint命令之前添加相對路徑,如

SDK_PATH/sdk/tools/lint project_path 
+0

當我嘗試它時,出現錯誤:「要正確分析Gradle項目,您應該運行」gradlew:lint 「相反」 – 2015-04-21 05:15:37