System.loadLibrary() error

前端 未结 5 1223
你的背包
你的背包 2021-01-12 14:10

I successfully cross-compiled a c++ library with the android ndk-Standalone toolchain then, i created a new android application project into Eclipse and when i put mylib.so

5条回答
  •  再見小時候
    2021-01-12 14:39

    If you have your compiled native library (the .so-file) in your lib/-directory, you can refer to it without using the full path:

    static{
      System.load("mylib");
    }
    

    As shown in the tutorial.


    Check to see if you set the right package in your Header-file: How to resolve the java.lang.UnsatisfiedLinkError in NDK in Android?

提交回复
热议问题