Problem
When using the javah instruction to generate the. h file under the Android project path, Javah-classpath bin/classes-d jni com.example.myhellojni.MainActivity
---> Error occurred: Unable to access Android.app.Activity android.app.Activity class file was not found.
Where-classpath bin: represents the road strength of the class
Where-D JNI: Represents the directory where the generated header file resides
Where Com.example.hellojni.HelloJni is the full class name
"Solution"
Enter the SRC directory, using javah-d. /JNI com.example.myhellojni.MainActivity directive instead.
Where-D: Create a directory.
Among them. /jni: The header file is generated under the Jni file of the parent directory.
Principle:. Java files are also not compiled to generate. h files directly.
Error: Unable to access android.app.Activity Android.app.Activity class file could not be found