Android JNI HelloJni应用程序中的NullPointerException

时间:2015-02-06 07:20:42

标签: android android-ndk java-native-interface

当我试图执行

javah -classpath NDK1_29jan/bin/classes;/home/XXXXX/Android_Eclipse_9sept/android-sdk-linux/platforms/android-15/android.jar -o HelloJNI.h com.example.hellojni.HelloJni

然后,它在控制台中显示异常

Error: no classes specified
Exception in thread "main" java.lang.NullPointerException
at sun.launcher.LauncherHelper.getMainClassFromJar(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

NDK1_29jan是我的项目名称。我已经在.bashrc文件中设置了这样的路径:

 $export NDK=~/home/XXXXX/Android/ndk/android-ndk-r9d

0 个答案:

没有答案