Building Android package via maven fails
See original GitHub issueIt seems that since the update to mapsforge/vtm 0.8.0 we can no longer build the Android demo (at least via maven). The problem is the class clash of two different jts jars: one older 1.13 (from gh-core) and the 1.14 jts-core
from mapsforge vtm-jts
- see this change.
The cleanest way would be to upgrade to 1.14 for gh-core. @michaz what blocking issues are there to do so? I remember it was GeoJSON related but as mapsforge does also related stuff - maybe @devemux86 can help?
- fix dep problem or workaround the issue for now via some dep exclusion
- the NetBeans graph dependency viewer shows a clash for
slf4j-api
: 1.7.12 vs. 1.7.21 … In GH we usually use 1.7.25 and now there is also a more recentslf4j-android
so we should be able to update this.
BTW: The error message when executing mvn -P include-android -DskipTests=true clean install
was a bit cryptic:
[ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.4.3:dex (default-dex) on project graphhopper-android: : MojoExecutionException: ANDROID-040-001: Could not execute: Command = ...
Executing the listed command showed me the problem:
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/vividsolutions/jts/JTSVersion;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/vividsolutions/jts/algorithm/Angle;
...
Excluding one or the other jts library does not fix the problem or causes others.
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (23 by maintainers)
Top Results From Across the Web
Android Studio-Build Failed - maven - Stack Overflow
I don't know where it comes from, I work behind a proxy, but I configured it well: the test connection in android studio...
Read more >Configure your build - Android Developers
Note: Because Gradle and the Android Gradle plugin run independently from Android Studio, you need to update the build tools separately. Read the...
Read more >How to add maven library in new Android Studio 2022 ...
In the New Android Studio(Chipmunk | Bumblebee ) file strucure changed a bit, so in order to add the maven library we have...
Read more >IntelliJ IDEA - Troubleshooting common Maven issues
If you received the OutOfMemory error, try to increase the heap size for the Maven importer. In the Settings/Preferences dialog ( Ctrl+Alt+S ),...
Read more >Maven and Gradle support for Java in Visual Studio Code
Right-click on a target folder and select Create Maven Project. Gradle. VS Code supports Gradle Java project (not including Android) via the Gradle...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks!
It looks like 1.15 is around the corner (see slide 5 here) and if that will be the case I’ll ask/help those dependencies to upgrade so we reduce potential license problems when using GH in iOS or Android (due to the LGPL).
My local builds work, can you try: