From: Will B. <wil...@cl...> - 2015-02-28 01:20:43
|
I am trying to use geojson in my android studio project. If I add this to my project's build.gradle: allprojects { repositories { mavenCentral() maven { url "http://download.osgeo.org/webdav/geotools" } } } and this to my app's build.gradle: dependencies { compile 'org.geotools:gt-geojson:12.2' } I get the following error: Error:Artifact 'jai_core.jar (javax.media:jai_core:1.1.3)' not found. Searched in the following locations: https://repo1.maven.org/maven2/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar Is there a workaround? What is the correct way to build a gradle project depending on geojson? |
From: Mark P. <mc....@gm...> - 2015-03-02 08:30:44
|
On 28-02-15 01:27, Will Bendick wrote: > I am trying to use geojson in my android studio project. If I add this > to my project's build.gradle: > > allprojects { > repositories { > mavenCentral() > maven { > url "http://download.osgeo.org/webdav/geotools" > } > } > } > > and this to my app's build.gradle: > > dependencies { > compile 'org.geotools:gt-geojson:12.2' > } > > I get the following error: > > Error:Artifact 'jai_core.jar (javax.media:jai_core:1.1.3)' not found. > Searched in the following locations: > https://repo1.maven.org/maven2/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar > > Is there a workaround? What is the correct way to build a gradle project > depending on geojson? You will need to install jai_core by hand in your local repository; the license prohibits distribution via maven central. A current version of geotools should be able to build without jai from what I read there. See: http://docs.geotools.org/latest/userguide/build/install/jdk.html#java-advanced-imaging Mark |
From: Will B. <wil...@cl...> - 2015-03-02 18:04:36
|
Hi Mark, I tried this but it is still failing to build with the same error. I have this in my build.gradle: dependencies { compile fileTree(include: '*.jar', dir: 'libs') compile 'org.geotools:gt-geojson:12.2' compile 'com.google.android.gms:play-services:+' compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.github.erd:android-volley:1.0.0' compile 'com.vividsolutions:jts:1.13' } and the library is in place from the link you specified: ls app/libs/ jai_codec.jar jai_core.jar It still tries to find it on the web though: A problem occurred configuring project ':app'. > Artifact 'jai_core.jar (javax.media:jai_core:1.1.3)' not found. Searched in the following locations: https://repo1.maven.org/maven2/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar Any ideas? On Mon, Mar 2, 2015 at 12:30 AM, Mark Prins <mc....@gm...> wrote: > On 28-02-15 01:27, Will Bendick wrote: > > I am trying to use geojson in my android studio project. If I add this > > to my project's build.gradle: > > > > allprojects { > > repositories { > > mavenCentral() > > maven { > > url "http://download.osgeo.org/webdav/geotools" > > } > > } > > } > > > > and this to my app's build.gradle: > > > > dependencies { > > compile 'org.geotools:gt-geojson:12.2' > > } > > > > I get the following error: > > > > Error:Artifact 'jai_core.jar (javax.media:jai_core:1.1.3)' not found. > > Searched in the following locations: > > > https://repo1.maven.org/maven2/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar > > > > Is there a workaround? What is the correct way to build a gradle project > > depending on geojson? > > You will need to install jai_core by hand in your local repository; the > license prohibits distribution via maven central. > > A current version of geotools should be able to build without jai from > what I read there. > > See: > > http://docs.geotools.org/latest/userguide/build/install/jdk.html#java-advanced-imaging > > Mark > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > GeoTools-GT2-Users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > -- Will Bendick Natural Resource |
From: Mark P. <mc....@gm...> - 2015-03-03 08:05:14
|
On 02-03-15 18:37, Will Bendick wrote: > Hi Mark, > > I tried this but it is still failing to build with the same error. I > have this in my build.gradle: > > dependencies { > compile fileTree(include: '*.jar', dir: 'libs') > compile 'org.geotools:gt-geojson:12.2' > compile 'com.google.android.gms:play-services:+' > compile 'com.android.support:appcompat-v7:21.0.3' > compile 'com.github.erd:android-volley:1.0.0' > compile 'com.vividsolutions:jts:1.13' > } > > and the library is in place from the link you specified: > > ls app/libs/ > > jai_codec.jarjai_core.jar > > > It still tries to find it on the web though: > > Any ideas? not really a gradle user so I'm in the dark here. w/ maven to do this kind of thing (loading libs from outside the repository) you would have to override the dependency with a system scope I think. I you just want to have geojson parsing capabilities in android I'd probably look out for something else (eg. https://github.com/thedatachef/java-geojson) or roll your own. The SPI stuff will cause some extra work as well. Mark |
From: Jody G. <jod...@gm...> - 2015-03-02 17:48:14
|
geotools does not currently work on android last I checked: 1. replace SPI service registery with SPI service loader 2. replace vecmath with anything else Projects I know that have forked have grabbed the code and wired it up by hand, rather than using service loader. See: * http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html * http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html * http://docs.oracle.com/javase/7/docs/api/javax/imageio/spi/ServiceRegistry.html -- Jody Garnett On 27 February 2015 at 16:27, Will Bendick <wil...@cl...> wrote: > I am trying to use geojson in my android studio project. If I add this to > my project's build.gradle: > > allprojects { > repositories { > mavenCentral() > maven { > url "http://download.osgeo.org/webdav/geotools" > } > } > } > > and this to my app's build.gradle: > > dependencies { > compile 'org.geotools:gt-geojson:12.2' > } > > I get the following error: > > Error:Artifact 'jai_core.jar (javax.media:jai_core:1.1.3)' not found. > Searched in the following locations: > > https://repo1.maven.org/maven2/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar > > Is there a workaround? What is the correct way to build a gradle project > depending on geojson? > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > GeoTools-GT2-Users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > |