开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜