"Go" android:no implementation found for native

Source: Internet
Author: User

Workaround:

1. Check the definition of native C code:

JNIEXPORT void Java_com_example_something_MyClass_getMyString(JNIEnv * env, jobject obj) {
Where:com_example_something is the decomposition of the package name,MyClass is the class that calls the. so

2. Check if. So is loaded into the system:

ADB Shell Ls-l/data/data/com.example.something/lib/

3. Assume that Lib is libtest.so

Copy the file into the Libs directory, calling the code:

Static
{
System.loadlibrary ("test");//Note there is no prefix lib, corresponding to Local_module
}

Attached: typical ANDROID.MK

[HTML]View PlainCopy
    1. local_path := $ (call  My-dir)   
    2.   
    3. include $ (clear_vars)   
    4.   
    5. local_module    :=  TEST  
    6. local_src_files := mytest.c  
    7.   
    8. include $ (build_shared_library)  
JNIEXPORT void Java_com_example_something_MyClass_startServer(JNIEnv * env, jobject obj) {
Where:com_example_something is the decomposition of the package name,MyClass is the class that calls the. so

"Go" android:no implementation found for native

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.