创建ExternalTool,便于给java生成.jni头文件
AudioStudio>File>Settings>Tools>External Tools>
Name:.java to .h
Program:$JDKPath$\bin\javah.exe
Parameters:-classpath $OutputPath$ -o app/src/main/jni/jni_interface/$FileClass$.h $FileClass$
Working directory:$ProjectFileDir$
注意:
修改.java中的native接口之后要先Build>Make Project
然后再点Tools>External Tools>Jni
如果不make,jni可能失败