Having referred to --> Javah error while using it in JNI
...and --> android - javah doesn't find my class
...I still can\'t get javah
to wor
Got it! It needs the compiled class, not the source. Also, the class folder - ./build/intermediates/classes/debug
is hidden from the project in Android Studio.
This is the line that finally worked for me. From my module's root folder (/Users/HKS/Code/MusicPlayer-Android/dspLibrary/
):
javah -classpath /Applications/Android\ Studio.app/sdk/platforms/android-16/android.jar:./build/intermediates/classes/debug -jni -d src/main/jni -force com.company.audio.LibDSP
Note the -d
flag is the output folder, and -force
ensures it overwrites any existing files.