我在Github上找到了一个库,我想将它包含到我的Android项目中(我使用Android ),它使用Maven作为发行版。不幸的是,我不知道如何将这个库包含在Gradle中,因为Github页面上添加了Mavens pom.xml文件:
<dependency>
<groupId>com.github.japgolly.android</groupId>
<artifactId>svg-android</artifactId>
<version>2.0.6</version>
Github页面是https://github.com/japgolly/svg-android
到目前为止,我的build.gradle文件(不起作用):
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.tg.myapplication"
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url 'http://github.com/japgolly/svg-android' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'svg-android:2.0.6'
}发布于 2014-09-04 08:28:14
试试这个:
compile 'com.github.japgolly.android:svg-android:2.0.6'
https://stackoverflow.com/questions/25660658
复制相似问题