javah 生成jni文件的問題

命令:(on macbook for android)java

javah -d src/main/jni -jni -classpath /Users/Carlyle_Pro/Documents/android_adt/sdk/platforms/android-25/android.jar:build/intermediates/classes/debug apps.carlyle.com.testandroid.vortex.VortextView
 android

說明:app

1,-d:  指定輸出所在的文件夾ui

2,-classpath: 申明class 所在文件的位置。因爲這裏VortextView 中用到了Android 的相關類。所以class path 還指定了android.jar spa

注意這裏的class path 分割符號。mac 用[: ]  window 貌似是用 [;] 號;debug

3,對應的類:注意寫類的全路徑。而且不要寫.class 後綴。另外要注意到 build/intermediates/classes/debug 是class 文件所在目錄。orm

這兩個[build/intermediates/classes/debug apps.carlyle.com.testandroid.vortex.VortextView] 拼接起來就能定位到具體class 文件的位置(包名parse 成路徑的。)不然會報錯。blog

相關錯誤 參考這篇博客:macbook

http://juhbgf.blog.163.com/blog/static/59831768201332904025665/博客

相關文章
相關標籤/搜索