回答

1

如果您ActionBarSherlock庫不包含build.gradle文件,從這裏抓住它:https://github.com/JakeWharton/ActionBarSherlock/blob/dev/actionbarsherlock/build.gradle。將此文件保存到庫的根目錄中。

如果你引用從項目目錄庫之外,你應該定義在庫中settings.gradle,像這樣......

project(':actionbarsherlock').projectDir = new File('/path/to/library') 

,然後在該行之前對的,你應該有:include ':actionbarsherlock'

現在,在build.gradle文件,包括以下內容...

dependencies { 
    compile project(':actionbarsherlock') 
} 

現在你守LD能夠用Gradle構建。如果您不熟悉Gradle,請從這裏開始閱讀:http://www.gradle.org/docs/current/userguide/userguide.html

相關問題