3

I Create a WebCam based Android Application. I follow a YouTube video to create JNI to support my project. But i will show error on creating a JNI folder in parent directory.

When i compile the code in compiler

D:\SRINIVASAN\WebCam_Android\SudharsWebCam\app\src\main>javah -d jni -classpath D:\Android-New\platforms\android-19\android.jar;.. \ ..\build\intermediates\classes\debug com.example.sudharsanc.sudharswebcam.CameraPreview

It shows error as

javah is not recognized as an internal or external command, operable program or batch file.

Some of questions which the same already in stackoverflow , but it will not help to get the solutions.

Guide me. Thanks in Advance..

Manos Nikolaidis
  • 21,608
  • 12
  • 74
  • 82
  • 1
    Have you added on environment Variables -> System Variables something like -> C:\Program Files\Java\jdk1.8.0_31 ? – Skizo-ozᴉʞS ツ Oct 24 '15 at 11:54
  • `javah` is part of JDK. You can add the JDK\bin directory to PATH, then your command will succeed. – Alex Cohn Oct 24 '15 at 18:02
  • Ya, added the path in environment variable. But agin it will shown the error as **Could not find class file for 'com.example.sudharsanc.sudharswebcam.CameraPreview** . – sudharsan chandrasekaran Oct 26 '15 at 10:38
  • After making small changes in Environment variable my project support **javah** . Now it will shown new error during the time of creating jni directory. **Problem is :** Error: cannot access android.support.v7.app.AppCompatActivity class file for android.support.v7.app.AppCompatActivity not found – sudharsan chandrasekaran Oct 27 '15 at 04:28

1 Answers1

2

I got the answer to create jni folder using compiler javah command in android studio.

Follow the steps