在进行NDK开发时,我们需要向jni层传递Surface,Bitmap, …… 时,就会出现Error:Cannot determine signature for xxxx;
原因:the javah tool does not recognize Android classes, so you must add the classpath option to javah command.
解决方法:
windows:
javah -classpath C:\Android\Sdk\platforms\android-25\android.jar;. example.zhangjunling.com.ndk_makefile.MainActivity
linux/mac:
javah -classpath ~/Android/Sdk/platforms/android-25/android.jar:. example.zhangjunling.com.ndk_makefile.MainActivity