Android JNI- Add native support 不見了


當專案重新匯入時,經常遇到此問題,
jni檔案不會自動去build.

然後執行時就發生
java.lang.UnsatisfiedLinkError: Couldn't load xxx-library from loader dalvik.system.PathClassLoader[ ...

很簡單
1.專案先關閉,在用記事本開啟.project
2.找到下列幾行,刪除紅字部分
   
        com.android.ide.eclipse.adt.AndroidNature
        org.eclipse.jdt.core.javanature
        org.eclipse.cdt.core.cnature
        org.eclipse.cdt.core.ccnature

        org.eclipse.cdt.managedbuilder.core.managedBuildNature
        org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
   


3.重開eclipse,add native support就重新出現啦~

留言