How to Install geotools by gradle in android studio 3.1.2

北慕城南 提交于 2019-12-11 03:26:00

问题


I wan to use geotools in my project so i've added geotools lib in my repositories project gradle :

 allprojects {
    repositories {
        maven { url "http://repo.boundlessgeo.com/main" }
        maven { url "http://download.osgeo.org/webdav/geotools/" }
        jcenter()
        google()
    }
}

I have a module called map and i haved added this dependencies to this gradle:

dependencies {
    api 'com.google.android.gms:play-services-maps:15.0.1'
    api 'org.osmdroid:osmdroid-android:5.6.5'
    api 'com.github.MKergall:osmbonuspack:6.4'
    api 'com.vividsolutions:jts-core:1.14.0'
    api 'com.vividsolutions:jts-io:1.14.0'
    api 'org.orbisgis:cts:1.5.1', {
        exclude group: 'org.slf4j'
    }
    api 'org.jdom:jdom:1.1.3'
    api 'org.geotools:gt-metadata:19.0'
}

When i make this project i got this error:

Execution failed for task ':commision12:transformClassesWithDexBuilderForRelease'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\User
s\TazikA\.gradle\caches\modules-2\files-2.1\org.geotools\gt-opengis\19.0\f5a2e7f75e0883bfd319c57d935fb65a5c42e232\gt-opengis-19.0.jar

I have added multiDexEnabled true in defultConfig and api 'com.android.support:multidex:1.0.3' to my module gradle.

Someone have any idea that where is my mistake?

来源:https://stackoverflow.com/questions/50323013/how-to-install-geotools-by-gradle-in-android-studio-3-1-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!