Give us as much detail as possible regarding the issue you're experiencing.
ML2 OS version: B3E.220619.07-R.107
MLSDK version: SDK Version 29
Host OS: (Windows/MacOS) Windows 10
I would like to deploy on the ML2 an application mainly written in Java. I see that, in the samples, the AndroidManifest.xml has an entry hasCode
that is set to true
if the .apk has Java code, so I would assume what I am trying to do is possible.
The Java application consists of a MainActivity.java running on a GUI designed through an activity_main.xml file (standard android project structure). The project still uses gradle to build the apk. I tried the application on an android simulator and it works fine. I modified the gradle settings and the project settings to be able to build the app in the ML2, and although it is installed correctly on the device, when I run it I just see a black screen.
Hence, to find a workaround, I would now clone a ML2 sample and import the necessary java files, but I am wondering what I should do to have the java application build, since the samples are set up to compile c++ code. Basically, I would like to know what I need to write on the .cpp side to be able to compile a MainActivity.java and possible changes to the gradle files/project settings from the samples to support Java code, besides setting hasCode
to true
. I could not find any sample with Java code integrated.
Any help would be greatly appreciated.
Thanks.
Marco Beccarini