Skip to content

Instantly share code, notes, and snippets.

@donaldmunro
Created January 28, 2018 16:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donaldmunro/0e5fd744726713f0aa428f9029244f3d to your computer and use it in GitHub Desktop.
Save donaldmunro/0e5fd744726713f0aa428f9029244f3d to your computer and use it in GitHub Desktop.
# Using javah to generate .h files for Kotlin
# Assuming JNI function calls are in MainActivity.companion
STUDIO=/opt/android-studio
PACKAGE=my.package
$STUDIO/jre/bin/javah -jni -cp "$STUDIO/lib/kotlin-runtime.jar:build/tmp/kotlin-classes/debug" $PACKAGE.MainActivity.Companion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment