1.Settings -> tools -> External Tools -> 左下角加号➕添加
1.1 Windows配置
//Program: javah路径 根据自己的调整,Parameters和Working directory 可以照搬
Program: $JDKPath$/bin/javah //前提配置过JDK或者AS中有openJDK 或全路径
Parameters:-classpath . -jni -encoding UTF-8 -d $ModuleFileDir$/src/main/cpp $FileClass$
Working directory: $ModuleFileDir$\src\main\java
1.2 mac配置
//Program: javah路径 根据自己的调整,Parameters和Working directory 可以照搬
Program: /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/javah
Parameters: -classpath . -jni -encoding UTF-8 -d $SourcepathEntry$/cpp $FileClass$
Working directory: $SourcepathEntry$