Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add External Jar Library to Build Cordova Plugin (Ionic Framework)

Is that possible to add external jar library like android volley library when build cordova plugin for ionic framework, I have try build cordova plugin like in here, but in that tutorial it just use Android Core abilities, not external android libraries, is there a way to add it and is it possible ?

like image 745
Redturbo Avatar asked Dec 06 '15 08:12

Redturbo


1 Answers

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

On the config.xml you have to add it like this

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

The recommended way is adding the library using Gradle (if possible). Volley doesn't seems to be compatible, but you can use this compatible fork

<framework src="com.mcxiaoke.volley:library-aar:1.0.19" />
like image 52
jcesarmobile Avatar answered Nov 06 '22 13:11

jcesarmobile