android - javah doesn't find my class

前端 未结 3 987
忘了有多久
忘了有多久 2020-12-05 19:38

I am having troubles generating the C header file for JNI using javah.

Here\'s the script I use while standing in the \\bin

3条回答
  •  Happy的楠姐
    2020-12-05 20:17

    You specify the classpath to contain only android.jar.

    You also need to include the location where your classes are stored. In your case it is the current directory, so you need to use . (separated by ; on Windows). The invocation should look like this:

    javah -classpath C:\PROGRA~2\Android\android-sdk\platforms\android-8\android.jar;. com.test.JniTest
    

提交回复
热议问题