Trouble Installing on Android Device Running Arm Processor

I’m a bit confused, please excuse me if I’m pressing on the following, but if they jnijavacpp.so and other .so files are missing from my uber jar, why do they appear in the list that is returned when I run the command jar tf uberjar_name.jar command? There are many other .so files listed in there and they didn’t trigger the errors I’ve been getting.

I will try building my program with the command you indicated:

mvn clean compile exec:java -Dorg.bytedeco.javacpp.platform=android-arm -Dorg.bytedeco.javacpp.logger.debug -Dorg.bytedeco.javacpp.pathsfirst

and see if I too get the “Warning: Could not load Loader: java.lang.UnsatisfiedLinkError: no jnijavacpp in java.library.path” you shared above. Thanks.

Well, try it with ARToolkitPlus sample there just to make sure that works.

I’ll try it. I’ll copy/clone the MultiMain.java abd pom.xml file in some folder I’ll make and run the command mvn compile exec:java and see what that provides as output.

Ok, so I cloned/copied the MultiMain.java and pom.xml files onto my local machine and I executed the following command:

mvn clean compile exec:java -Dorg.bytedeco.javacpp.platform=android-arm -Dorg.bytedeco.javacpp.logger.debug=true -Dorg.bytedeco.javacpp.pathsfirst=true

Maven returned the following error of “option 1.5” not being supported any longer:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.758 s
[INFO] Finished at: 2021-01-15T07:31:39Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project multimain: Compilation failure: Compilation failure:
[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

Use a more recent version of Maven

But I am already using Maven 3.6.3 which is the most recent versiin of Maven in the Apache Maven website. :confused:

Hrm, also set -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7

Edit - my previoys respinse here I ran in a different directory - my bad. I still need to try your suggestion on the repository your forwarded me…

Sorry for any confusion.

Ok, for the MultiMain.java program, I ran the following command incorporating the source and target for the version of Maven to be used as you mentioned:

mvn clean compile exec:java -Dorg.bytedeco.javacpp.platform=android-arm -Dorg.bytedeco.javacpp.logger.debug=true -Dorg.bytedeco.javacpp.pathsfirst=true -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7

Executing this command gave me messages of Maven downloading stuff but then stopped with the following:


Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar (243 kB at 265 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.jar (335 kB at 335 kB/s)
Failed to open data/markerboard_480-499.raw

Use the data from here: ~rojtberg/artoolkitplus/trunk : files for revision 123

Or try another one like cpu_features…

How do I incorporate the .raw files from the link you gave me into my mvn command line command?

Like I said, if that sounds too complicated, try samples from another subdirectory like the one for cpu_features.

Ok, so I copied the “SimpleExample.java” file and its companion “pom.xml” file into another folder from the cpu_features directory in the github repository and I ran:

mvn clean compile exec:java -Dorg.bytedeco.javacpp.platform=android-arm -Dorg.bytedeco.javacpp.logger.debug=true -Dorg.bytedeco.javacpp.pathsfirst=true -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7

I now got the error:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.495 s
[INFO] Finished at: 2021-01-15T13:13:16Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project simpleexample: Could not resolve dependencies for project org.bytedeco.cpu_features:simpleexample:jar:1.5.5-SNAPSHOT: Could not find artifact org.bytedeco:cpu_features-platform:jar:0.6.0-1.5.5-SNAPSHOT -> [Help 1]

Am I supposed to be running maven on this pom file with the pom file just sitting alone in its own folder? I didn’t clone the whole javacpp-presets repository, I’ve just been copying the pom and java files and putting them together in their own folder.

I’d like to explore the alternative option you initially gave me in trying to get dl4j on my android device. The link you gave was:

For building an android application, there is an example here: deeplearning4j-examples/android-examples at master · eclipse/deeplearning4j-examples · GitHub

After I’ve cloned the above repository, what should I do (as with Maven, I’ve never used Gradle before besides getting it installed)? Do I immediately execute the maven commands in the “known issues” section (there’s no pom file in the indicated repository directory, so I wasn’t sure if Maven would work without me adding something extra)? I already have gradle installed and it’s working. Thanks.

Don’t use the current snapshot version, it’s not worth the trouble. Try the latest released version: