我想將我的gradle.build移植到gradle實驗中。我已經修改了我現有的Android配置,以通過如下:什麼使用庫更改爲gradle實驗0.6.0-alpha1?
android {
compileSdkVersion = compileSdk
buildToolsVersion = buildTools
useLibrary "org.apache.http.legacy"
defaultConfig.with {
minSdkVersion.apiLevel = 13
targetSdkVersion.apiLevel = compileSdk
versionName = fullVersion
multiDexEnabled = true
}
}
然而,在編譯時,我似乎得到錯誤:因爲我不能確定什麼useLibrary
被修改爲
Error:(148, 1) A problem occurred configuring root project.> Exception thrown while executing model rule:model.android @ build.gradle line 145, column 1> Could not find method useLibrary() for arguments [org.apache.http.legacy] on root project
可能。如果我對此作出評論,構建會繼續進行,直到它無法找到它可能從上述庫中期待的http方法。有人可以提供一些關於如何將這個庫包含在Gradle實驗中的指針嗎?
可能,要去嘗試,如果http://stackoverflow.com/questions/34503431/no-such-property-uselibrary-for-class解決我的問題。 –
任何想法傢伙?我一直無法解決這個問題。 –