Closed astonbitecode closed 4 months ago
Since jars/classes are not assets, they should be provided in a different way. As far as I remember, Android combines and "dexes" all Java code (classes and jars) together into classesX.dex
. You could invoke the command line tool (https://developer.android.com/tools/d8) and place the output file in the root (probably needs a new feature in cargo-apk
/xbuild
to allow this). Or use a "standard" Android gradle
project setup instead to link the jar
, and use different way to compile your Rust code (cargo-ndk
, rust-android-gradle
).
Maybe cargo-apk
/xbuild
should provide builtin support for this some day.
Thanks for the response. I understand android-activity
cannot influence the classpath, so, I guess we can close this.
Hi,
is it possible to add to the classpath additional jars or classes, so that they are available via the
JavaVM
provided byvm_as_ptr
?To be more specific, I could use
cargo-apk
and pack several assets in my apk (jars or classes) so that they are available for the Android app. Could I somehow add them in the classpath?