title: Javah Error android.app.Activity not found
body: <p>I'm trying to create a .h header file for a simple NDK project. Using cygwin I browse to <code>myprojectDIR\jni</code> directory, then execute this command:</p>
  
  <pre><code>javah -o com_myproject_MyActivity.h -classpath  myprojectDIR\bin\classes com.myproject.MyActivity
  </code></pre>
  
  <p>then this error message appears:<br/></p>
  
  <pre><code>Error: cannot access android.app.Activity
  class file for android.app.Activity not found
  </code></pre>
  
  <p>I have a native method inside <code>MyActivity</code> class, so I tried to create a new class called <code>NativeAccess</code> (does not extend any class from the android SDK) and it worked fine, the .h file was created, ndk-build and test on device where successful!</p>
  
  <p>So my problem is that I need my native methods inside android activities and services that I create, but I cant do that because the <code>Javah</code> command cannot access classes from inside the android-sdk itself. Please notice that I'm using (Windows-7 x64) and I have these environment variables:</p>
  
  <pre><code>ANDROID_NDK : C:\Android\android-ndk-r7b
  ANDROID_SDK : C:\Android\android-sdk
  ANT_HOME    : C:\ANT\apache-ant-1.8.3
  JAVA_HOME   : C:\Program Files\Java\jdk1.7.0_02
  PATH        : %JAVA_HOME%\bin;%ANDROID_SDK%\tools;%ANDROID_SDK%\platform-tools;%ANDROID_NDK%;%ANT_HOME%\bin; (other unrelated stuff)
  </code></pre>
  
  <p>Thanks in advance</p>