Javah still won't find class files in OSX / Android Studio

主宰稳场 提交于 2019-12-01 11:40:13

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!