Chilkat for Android™ (Java)
The Chilkat Java library for Android: native JNI shared libraries plus the Chilkat Java class sources, ready to add to an Android Studio project.
Building a native (C/C++) Android app instead? See the Chilkat C/C++ Android native libraries.
Download
What's in the download
Unzip to any directory. The archive contains a native JNI library for each Android ABI and the Chilkat Java class source files:
chilkat-android/ ├─ libs/ native JNI libraries, one per ABI │ ├─ arm64-v8a/ libchilkat.so 64-bit ARM (most devices) │ ├─ armeabi-v7a/ libchilkat.so 32-bit ARM (older devices) │ ├─ x86/ libchilkat.so 32-bit x86 emulator │ └─ x86_64/ libchilkat.so 64-bit x86 emulator ├─ src/com/chilkatsoft/ Chilkat Java class sources (Ck*.java) ├─ license.pdf ├─ pcre2-license.pdf └─ quickjs-license.pdf
Unlike the desktop Java download, there is no chilkat.jar — you add
the Chilkat Java source files to your project and the per-ABI .so
libraries to your APK.
Getting started (Android Studio)
-
Add the native libraries
Copy the
libs/<abi>/libchilkat.sofiles into your app's src/main/jniLibs/<abi>/ directory, keeping the same ABI folder names (arm64-v8a,armeabi-v7a,x86,x86_64). Gradle bundles the matching ABI into the APK automatically.See Location of JNI shared libraries in the APK directory tree and Using Chilkat Android for Java in an Android Studio project.
-
Add the Chilkat Java sources
Copy the
src/com/chilkatsoft/source files into your project so they keep thecom.chilkatsoftpackage path (e.g. under src/main/java/com/chilkatsoft/).See Copy Chilkat Java sources into your Android project directory tree.
-
Load the native library
Load
libchilkatonce before using any Chilkat class — for example in a static initializer or yourApplication.onCreate:static { System.loadLibrary("chilkat"); }
-
Grant INTERNET permission
Any Chilkat feature that uses the network needs the INTERNET permission. Add it to your
AndroidManifest.xml:<uses-permission android:name="android.permission.INTERNET" /> -
Unlock Chilkat
Call
UnlockBundleonce at startup (any string starts the 30-day trial; use your license code after purchase):import com.chilkatsoft.CkGlobal; CkGlobal glob = new CkGlobal(); boolean success = glob.UnlockBundle("Anything for 30-day trial"); if (success == false) { System.out.println(glob.lastErrorText()); }
Common errors
“UnsatisfiedLinkError: ... couldn't find libchilkat.so”
Either System.loadLibrary("chilkat") wasn't called before using a Chilkat
class, or the .so for the device/emulator's ABI isn't in
jniLibs/<abi>/. Make sure you copied the ABI(s) you need (include
arm64-v8a for real devices).
Network calls fail (SocketException / permission denied)
The app is missing the INTERNET permission. Add
<uses-permission android:name="android.permission.INTERNET" /> to the
manifest.
Crash loading the library on Android 15+ devices
This can be a 16 KB page-size issue. Use Chilkat 9.5.0.99 or later, which supports 16 KB pages.
“cannot find symbol” / unresolved com.chilkatsoft.* classes
The Chilkat Java sources weren't added with the correct package path. They must live
under a com/chilkatsoft/ folder on your source path.