Search code examples
androidcjava-native-interfacelibxml2

use libxml2 in android with JNI


I have created an app in android using JNI(as major part of my code is in C).Now i am having a requirement to parse xml in my application.since i have chosen libxml2 for my application, can any one please tell me how to use libxml2 in my android application.


Solution

  • since there is no prebuilt libxml.so/.a file for libxml2 parser, so we need to create the library (either .so/.a) and use that in application, u have to download all the .c/.h/android.mk/Application.mk and just build the libxml library(either .so/.a)