开发者

How to load a library .so file into android application? [closed]

开发者 https://www.devze.com 2023-03-14 18:00 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in i开发者_开发问答ts current form.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in i开发者_开发问答ts current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

Can anyone tell me with an .so file given we need to calla jni method in app? The .so file contains implementation methods in C. Thanks in advance.


use this code..

 public class NativeLib {

      static {
        System.loadLibrary("ndk_demo");
      }

      /** 
       * Adds two integers, returning their sum
       */
      public native int add( int v1, int v2 );

      /**
       * Returns Hello World string
       */
      public native String hello();
    }

for more info..http://marakana.com/forums/android/examples/49.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号