Add an external Jar library to create the Cordova plugin (Ionic Framework)

Is it possible to add an external jar library, such as the android volleyball library when building the cordova plug-in for the ion skeleton, I tried to build the cordova plug-in, as in here , but in this tutorial it just uses the capabilities of Android Core, and not external Android libraries, there is is there a way to add it and is it possible?

+5
source share
1 answer

Yes, you can use dependency libraries in cordova plugins for Android

In config.xml you should add it like this:

<lib-file src="src/android/libs/yourLibName.jar"/> 

The recommended way is to add the library using Gradle (if possible). Volleyball doesn't seem compatible, but you can use this compatible fork

 <framework src="com.mcxiaoke.volley:library-aar:1.0.19" /> 
+8
source

Source: https://habr.com/ru/post/1237492/


All Articles