我想爲我的android項目使用「slib-dist-0.9-all-jar」。slib-dist-0.9-all-jar gradle build中無法識別的依賴關係
我從semantics measure library下載了jar,並將其複製到我的android項目/ apps/libs文件夾中。並在gradle中添加一行爲「編譯文件('libs/slib-dist-0.9-all-jar')」,但它表示它不是jar文件。我也試過直接給gradle這個構建與
compile group: 'com.github.sharispe', name: 'slib-sml', version: '0.9.1'
但在這種情況下,它說
Unrecognized dependency: 'com.github.sharispe:slib-graph:0.9.1' (type: 'pom', extension: 'pom')
。
請幫助我能做些什麼來使用它作爲jar文件,而不是pom?
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile files('libs/slib-dist-0.9-all-jar') //OR THIS
compile group: 'com.github.sharispe', name: 'slib-sml', version: '0.9.1'
}
你把它作爲庫添加了嗎? –