JNI Native Load Module
- Mobile/android
- 2012. 12. 5.
JNI 를 이용할때 아래의 코드를 사용하면 편하다.
// native Load Library static { loadLibrary("native_sample"); } /** A helper for loading native libraries stored in "libs/armeabi*". */ public static boolean loadLibrary(String nLibName) { try { System.loadLibrary(nLibName); DebugLog.LOGI("Native library lib" + nLibName + ".so loaded"); return true; } catch (UnsatisfiedLinkError ulee) { DebugLog.LOGE("The library lib" + nLibName + ".so could not be loaded"); } catch (SecurityException se) { DebugLog.LOGE("The library lib" + nLibName + ".so was not allowed to be loaded"); } return false; }
'Mobile > android' 카테고리의 다른 글
[android/Layout] FrameLayout 사용방법 (0) | 2013.01.07 |
---|---|
[android] activity_main_out.xml 파일생성 에러 (0) | 2013.01.07 |
[Android] 작업하면서~ 메모 (0) | 2012.12.04 |
Unable to resolve target 'android-11' until the SDK is loaded (0) | 2012.11.19 |
eclipse for Android NDK (0) | 2012.09.27 |