Android Question Top Level Exception OSMdroid

Philip Prins

Active Member
Licensed User
Longtime User
Hello ,

I am using 2 Libraries , OSMdroid and a custom library:
When compiling i get the error already added , see below.

Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/BasicMDCAdapter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/BasicMarker;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/BasicMarkerFactory;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/MarkerIgnoringBase;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/MessageFormatter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/NOPLogger;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/NamedLoggerBase;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/SubstituteLoggerFactory;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lorg/slf4j/helpers/Util;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
at com.android.dx.command.dexer.Main.runDx(Main.java:293)
at com.android.dx.command.dexer.Main.main(Main.java:249)
at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
... 4 more

When i use the custom library without slf4j on older devices i get the error :
Websocket error: Log tag "org.java_websocket.drafts.Draft_6455" exceeds limit of 23 characters

How can i remove the classes used by OSMdroid ?

I tried to unzip the OSM .jar and remove the sl4j folder but still get the error when compiling.

Is there an alternative to OSMdroid?
 

Philip Prins

Active Member
Licensed User
Longtime User
Goodmorning,

I removed the slf4j folder from the OSM .jar

Cleaned the project

I get the following error while compiling:
javac 1.8.0_191
src\comm\check\mapgpsview.java:333: error: package uk.co.martinpearman.b4a.osmdroid.views.wrappers does not exist
public uk.co.martinpearman.b4a.osmdroid.views.wrappers.MapViewWrapper _mapview1 = null;
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
 
Upvote 0
Top