Linking as External Dependency with Gluon Eclipse Plugin

43 views
Skip to first unread message

bolt4...@gmail.com

unread,
Apr 24, 2016, 10:16:05 AM4/24/16
to JavaFXAndroid
Hello I'm trying to build an application using Gluon's Eclipe Plugin for Android. I want to try accessing native Android api's so I tried following some tutorials such as this http://www.lodgon.com/dali/blog/entry/Using_Android_APIs_in_JavaFX one which involves linking an android.jar and dalvik sdk jar with my project. I've had multiple issues with this but the one that I'm down to now is that the generated Activity class is called FXActivity.class in the javafxports.android package, this clashes with the already existing javafxports.android.FXActivity class that I'm trying to use to access native api's. This becomes a problem when the gradle build tries to merge everthing into a single jar file. The build fails because of a conflict with the classes, here is some of the log

:shrinkMultiDexComponents FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shrinkMultiDexComponents'.
> java.io.IOException: Can't write [C:\Users\USERNAME\Documents\Programming\Eclipse\AndroidNative\build\javafxports\tmp\android\multi-dex\componentClasses.jar] (Can't read [C:\Users\USERNAME\Documents\Programming\Eclipse\AndroidNative\build\javafxports\tmp\android\multi-dex\allclasses.jar] (Duplicate zip entry [allclasses.jar:javafxports/android/FXActivity.class]))

Does anyone have a solution for me? All help is appreciated, thanks.

José Pereda

unread,
Apr 24, 2016, 2:11:30 PM4/24/16
to JavaFXAndroid, bolt4...@gmail.com
Hi, could you post this question at StackOverflow

Check Gluon Charm Down to access some native services, or check Gluon samples to see how you can create your own, like Go Native.

Thank you,
Jose
Reply all
Reply to author
Forward
0 new messages