2

I want to generate headers using javah but when i do i get an error:

Error: cannot access android.support.v4.app.FragmentActivity
  class file for android.support.v4.app.FragmentActivity not found

I created new External Tool with this parameters:

  • Location: D:\Android\jdk1.7.0_51\bin\javah.exe

  • Working Directory: D:\Android\workspace\MyApp\bin\

  • Arguments: -d D:\Android\workspace\MyApp\jni -classpath D:\Android\workspace\MyApp\bin\classes;D:\Android\workspace\appcompat_v7\libs\android-support-v7-appcompat.jar com.example.myapp.MainActivity

I use last version of Android SDK and NDK as last version of Java. Any suggestions?

Jason C
  • 38,729
  • 14
  • 126
  • 182

1 Answers1

0

This can be solved by adding android-support-v4.jar to your javah class path arguments.

I am not an Android developer, this was a result of hunting around on Google (for example, information derived indirectly from the answer to IntelliJ 12 + ActionBarSherlock setttings: Could not find class 'android.support.v4.app.FragmentActivity'). I do not know why this is required in addition to standard v7 jars, and I am posting this answer as community wiki in hopes that somebody with more experience can edit it to add some more information in the future.

Community
  • 1
  • 1
Jason C
  • 38,729
  • 14
  • 126
  • 182