Android error -- No implementation found for native Lcomd, error -- nolcomd

Source: Internet
Author: User

Android error -- No implementation found for native Lcomd, error -- nolcomd

No implementation found for native Lcom errors occurred during Cpp compilation and running using NDK. After debugging for a long time, it was discovered that

XXX. h and XXX. cpp. In XXX. cpp # include XXX. h, No implementation found for native Lcom exists.

Then, XXX. h is deleted, all of which are implemented in XXX. cpp and are passed.

NDK cannot include the XXX. h compiled by javah directly. To include at least some statements. Of course, you can include other. H files.

/* DO NOT EDIT THIS FILE - it is machine generated */#include <jni.h>/* Header for class com_ndk_test_JniClient *///#ifndef _Included_com_ndk_test_JniClient//#define _Included_com_ndk_test_JniClient#ifdef __cplusplusextern "C" {#endif/* * Class:     com_ndk_test_JniClient * Method:    AddStr * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; */JNIEXPORT jstring JNICALL Java_com_ndk_test_JniClient_AddStr  (JNIEnv *, jclass, jstring, jstring);/* * Class:     com_ndk_test_JniClient * Method:    AddInt * Signature: (II)I */JNIEXPORT jint JNICALL Java_com_ndk_test_JniClient_AddInt  (JNIEnv *, jclass, jint, jint);#ifdef __cplusplus}#endif//#endif


#include "com_ndk_test_JniClient.h"#include <stdlib.h>#include <stdio.h>#ifdef __cplusplus   extern "C"  {   #endif  /* * Class:     com_ndk_test_JniClient * Method:    AddStr * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; */JNIEXPORT jstring JNICALL Java_com_ndk_test_JniClient_AddStr  (JNIEnv *env, jclass arg, jstring instringA, jstring instringB){    jstring str = (*env)->NewStringUTF(env, "HelloWorld from JNI !");    return str;       }/** Class:     com_ndk_test_JniClient* Method:    AddInt* Signature: (II)I*/JNIEXPORT jint JNICALL Java_com_ndk_test_JniClient_AddInt  (JNIEnv *env, jclass arg, jint a, jint b){    return a + b;}#ifdef __cplusplus   }   #endif




After I have compiled a so library and load it in the program, an error will be reported when the native method nativeCreateObject () is called.

The dynamic library is not found,

No implementation found for native Lorg/cocos2dx/lib/Cocos2dxHelper; nativesetapkpath

Does org. cocos2dx. lib. Cocos2dxHelper. java exist in the src directory? Or you can reference the external cocos2dx library.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.