In learning the NDK, when I used the Javah command to generate a header file in the project's bin/classes directory, there was an "error: unable to access the android.app.Activity found Android.app.Activity class file" issue, as follows
Jump to the project's SRC directory using the Javah command, instead of using the Javah command under the project's Bin/classes directory!
Unable to access android.app.Activity is a description without introducing Android.jar package
You can look at the specific instructions inside the java-h.
There is a-bootclasspath parameter that allows him to point to the Android.jar package
Here's an example: Javah-classpath bin/classes-bootclasspath D:\Environment\android-sdk-windows\android-sdk-windows\ platforms\android-16\android.jar-d JNI com.jm.promedia.SecondActivity
Alternatively, you can also go to the SRC directory under javah-d. /jni com.jm.promedia.SecondActivity
Where-D is to create a directory to put the generated files in
The Javah command is used to generate the. h file under the command line, and the workaround for "error: Unable to access android.app.Activity found Android.app.Activity class file" appears