错误:无法访问 com.myproject.FirstNDKProjectActivity
未找到 com.myproject.FirstNDKProjectActivity 的类文件
javadoc: 错误 - 找不到类 com.myproject.FirstNDKProjectActivity。
Error: 未在命令行中指定任何类。请尝试使用 -help。
总有以上错误,尝试下面的方法:
The ant part of the Android build system actually places the class files in bin/classes
. So you need to have $PROJECT_DIRECTORY/bin/classes
javah
$PROJECT_DIRECTORY/src$ javah -classpath ../bin/classes bt.nativeclient.BtnativeActivity
This assumes that you've compiled your Java code to the corresponding class files first. You can check by seeing what is in the bin/classes directory - it should contain the bt
应该这样:
~/android_workspace/FirstNDKProject/src$ javah -classpath ../bin/classes/ com.myproject.FirstNDKProjectActivity
生成头文件就在src下面!
OK!