I want to use the jar library with my own Android plug-in.

Asked 2 years ago, Updated 2 years ago, 72 views

I use monaca to develop Android apps.
I'd like to use the jar library provided by the manufacturer with my own Android plug-in.
I don't know where to store the jar library and how to set the classpath.

With cordova, by storing the jar library in the /platforms/android/libs folder
I can complete the build of my own plug-in, but I can't find such a folder in monaca.

Could you please let me know what I should do if monaca handles jar libraries?

monaca cordova

2022-09-30 14:06

1 Answers

If you are creating a plug-in, it must be in plugman format.
If it's in plugman format, you can put the jar file in the same way as the java file.
For example,
https://github.com/NIFTYCloud-mbaas/monaca_push_plugin
See the .

This plug-in deals with a jar file called NCMB.jar.

in plugin.xml
<lib-file src="src/android/libs/NCMB.jar"/>

It says that if you incorporate this plug-in, the project
The lib directory is automatically configured with NCMB.jar (common specification for Cordova/Monaca).


2022-09-30 14:06

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.