Generate C header file (*.h) for native method implementation JNI in android studio

后端 未结 3 1402
一个人的身影
一个人的身影 2021-01-14 10:37

How to generate C header file (*.h) containing the function prototype for the native method implementation JNI in Android studio while build automatically?

Thank You

3条回答
  •  耶瑟儿~
    2021-01-14 11:43

    For the Generation of the header file in the android studio please follow the given few steps.

    1) Open Android Studio Terminal
       (At Left Bottom Corner Given Terminal Tab)
    
    2) type this command first
       (cd app/src/main)
       it is located to the your main source directory.
    
    3) now type this command in the termial for the generation of the header file
       (javah -d cpp -classpath ../../build/intermediates/classes/debug .)
    
    

提交回复
热议问题