Issue
I am using Ubuntu Linux 32bit system, in terminal it shows no class specified
sanidhya09@sanidhya09:~/workspace/NdkFooActivity$ javah -jni -classpath adt-bundle-linux-x86/sdk/platforms/android-4.2/android.jar;bin/classes/ -d jni/ com.example.NdkFooactivity Error: no classes specified bash: bin/classes/: Is a directory
even i have tried this
sanidhya09@sanidhya09:~/workspace/NdkFooActivity/bin/classes$ javah
-jni -classpath adt-bundle-linux-x86/sdk/platforms/android-4.2/android.jar; com.example.NdkFooactivity.NdkFooActivity Error: no classes specified com.example.NdkFooactivity.NdkFooActivity: command not found
even i tried External tools configuration where in argument section i wrote
-d /home/sanidhya09/workspace/NdkFooActivity/jni -classpath /home/sanidhya09/adt-bundle-linux-x86/sdk/platforms/android-4.2/android.jar:/home/sanidhya09/workspace/NdkFooActivity/bin/classes com.example.NdkFooactivity
even in eclipse i get error saying make:
[HelloJni] Error 127 HelloJni C/C++ Problem
Solution
sanidhya09@sanidhya09:~/workspace/NdkFooActivity$ javah -jni -classpath bin/classes:~/adt-bundle-linux-x86/sdk/platforms/android-16/android.jar com.example.NdkFooactivity.NdkFooActivity
should be fine, assuming your app package is com.example.NdkFooactivity and the class you are interested in is NdkFooActivity.
Note that you must pass the path to android.jar
you actually used to compile. In my SDK, the directory is called android-16
, not android-4.2
. Also, you need to have the bin/classes
directory in classpath. You may need more jars in your classpath.
Answered By - Alex Cohn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.