Android Question Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/ortiz/touch/TouchImageView;

MarkNZ

Member
Licensed User
Longtime User
I am installing B4A on another computer before the one it is used on fails.

When I transfer the B4A setup and Android and Java, as far as I can tell, exactly as it is on the source computer I get a series of compile errors
in an app that compiles fine on the source computer. The errors a specifically wrt the JSTouchImageView library.
(The project references about 25 other libraries without a problem)

EG
"Compiling generated Java code. (0.00s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/ortiz/touch/TouchImageView;"

There are a serires of uncaught translation error lines all referencing to the JSTouchimageview library.
If I remove the library and comment out any references to it within the relevant activity, it compiles fine.

I also get the error if I start a new project and add the library and use it.

Does anyone have a suggestion as to what is causing this error on the new computer?

Thanks guys
 

DonManfred

Expert
Licensed User
Longtime User
Which B4A Version are you using?
Are you compiling against AndroidX? Please post the full compilingwindow text

In case you are using AndroidX; did you jetified all libraries?
 
Upvote 0

MarkNZ

Member
Licensed User
Longtime User
Yes it does use androidX. I ran the Jetifier and all sorted now.

Thanks for that. Worked a charm!!

As I copied the whole B4A setup including all the libraries from the source computer installation I expected it to all work exactly as it did there. I did install that library from the site but only after the errors showed up. Any way doesn't matter as long as it works!! Thanks again.
 
Upvote 0
Top