마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

Android Studio NDK java.lang.UnsatisfiedLinkError 납니다.

0 추천

android studio 에서 ndk 사용법에 대해 잘 몰라서 질문을 계속드리고있습니다 ㅠㅠ 많은 질문에도 답변 달아주신 분들께 정말 감사드립니다. 이번에는 정말 될 것같았는데 Error 가 나네요... 이미지 올리겠습니다.

 com_example_jsb_hellojni2_MyActivity.h

/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_example_jsb_hellojni2_MyActivity */

#ifndef _Included_com_example_jsb_hellojni2_MyActivity
#define _Included_com_example_jsb_hellojni2_MyActivity
#ifdef __cplusplus
extern "C" {
#endif
#undef com_example_jsb_hellojni2_MyActivity_MODE_PRIVATE
#define com_example_jsb_hellojni2_MyActivity_MODE_PRIVATE 0L
#undef com_example_jsb_hellojni2_MyActivity_MODE_WORLD_READABLE
#define com_example_jsb_hellojni2_MyActivity_MODE_WORLD_READABLE 1L
#undef com_example_jsb_hellojni2_MyActivity_MODE_WORLD_WRITEABLE
#define com_example_jsb_hellojni2_MyActivity_MODE_WORLD_WRITEABLE 2L
#undef com_example_jsb_hellojni2_MyActivity_MODE_APPEND
#define com_example_jsb_hellojni2_MyActivity_MODE_APPEND 32768L
#undef com_example_jsb_hellojni2_MyActivity_MODE_MULTI_PROCESS
#define com_example_jsb_hellojni2_MyActivity_MODE_MULTI_PROCESS 4L
#undef com_example_jsb_hellojni2_MyActivity_MODE_ENABLE_WRITE_AHEAD_LOGGING
#define com_example_jsb_hellojni2_MyActivity_MODE_ENABLE_WRITE_AHEAD_LOGGING 8L
#undef com_example_jsb_hellojni2_MyActivity_BIND_AUTO_CREATE
#define com_example_jsb_hellojni2_MyActivity_BIND_AUTO_CREATE 1L
#undef com_example_jsb_hellojni2_MyActivity_BIND_DEBUG_UNBIND
#define com_example_jsb_hellojni2_MyActivity_BIND_DEBUG_UNBIND 2L
#undef com_example_jsb_hellojni2_MyActivity_BIND_NOT_FOREGROUND
#define com_example_jsb_hellojni2_MyActivity_BIND_NOT_FOREGROUND 4L
#undef com_example_jsb_hellojni2_MyActivity_BIND_ABOVE_CLIENT
#define com_example_jsb_hellojni2_MyActivity_BIND_ABOVE_CLIENT 8L
#undef com_example_jsb_hellojni2_MyActivity_BIND_ALLOW_OOM_MANAGEMENT
#define com_example_jsb_hellojni2_MyActivity_BIND_ALLOW_OOM_MANAGEMENT 16L
#undef com_example_jsb_hellojni2_MyActivity_BIND_WAIVE_PRIORITY
#define com_example_jsb_hellojni2_MyActivity_BIND_WAIVE_PRIORITY 32L
#undef com_example_jsb_hellojni2_MyActivity_BIND_IMPORTANT
#define com_example_jsb_hellojni2_MyActivity_BIND_IMPORTANT 64L
#undef com_example_jsb_hellojni2_MyActivity_BIND_ADJUST_WITH_ACTIVITY
#define com_example_jsb_hellojni2_MyActivity_BIND_ADJUST_WITH_ACTIVITY 128L
#undef com_example_jsb_hellojni2_MyActivity_CONTEXT_INCLUDE_CODE
#define com_example_jsb_hellojni2_MyActivity_CONTEXT_INCLUDE_CODE 1L
#undef com_example_jsb_hellojni2_MyActivity_CONTEXT_IGNORE_SECURITY
#define com_example_jsb_hellojni2_MyActivity_CONTEXT_IGNORE_SECURITY 2L
#undef com_example_jsb_hellojni2_MyActivity_CONTEXT_RESTRICTED
#define com_example_jsb_hellojni2_MyActivity_CONTEXT_RESTRICTED 4L
#undef com_example_jsb_hellojni2_MyActivity_RESULT_CANCELED
#define com_example_jsb_hellojni2_MyActivity_RESULT_CANCELED 0L
#undef com_example_jsb_hellojni2_MyActivity_RESULT_OK
#define com_example_jsb_hellojni2_MyActivity_RESULT_OK -1L
#undef com_example_jsb_hellojni2_MyActivity_RESULT_FIRST_USER
#define com_example_jsb_hellojni2_MyActivity_RESULT_FIRST_USER 1L
#undef com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_DISABLE
#define com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_DISABLE 0L
#undef com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_DIALER
#define com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_DIALER 1L
#undef com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_SHORTCUT
#define com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_SHORTCUT 2L
#undef com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_SEARCH_LOCAL
#define com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_SEARCH_LOCAL 3L
#undef com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_SEARCH_GLOBAL
#define com_example_jsb_hellojni2_MyActivity_DEFAULT_KEYS_SEARCH_GLOBAL 4L
/*
 * Class:     com_example_jsb_hellojni2_MyActivity
 * Method:    getMessage
 * Signature: ()Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_com_example_jsb_hellojni2_MyActivity_getMessage
  (JNIEnv *, jobject);

#ifdef __cplusplus
}
#endif
#endif

Error

MyActivity.java

Android.mk

MyJni.c

build.gradle

이번 질문이 마지막 이였으면 좋겠습니다 ㅠㅠ 

우랴 (3,680 포인트) 님이 2014년 7월 22일 질문
우랴님이 2014년 7월 22일 수정

1개의 답변

0 추천

MyJni파일 Build하셨어요?

수정한걸... 빌드안하시고 불르면 에러납니다..

whdrb19 (23,520 포인트) 님이 2014년 7월 22일 답변
예 빌드 계속 해봤는데도 똑같습니다.. Build -> Make Project 말씀하시는거 맞으시죠?
그건...프로젝트빌드구요..
NDK 빌드 명령어요..
아.. ndk-build 말씀하시는 건가요?
네~~~~~~~~~~~~~~~~
헉!!! 됐습니다 !!! 하.. 진짜 감사합니다.. ㅠㅠ
...