Unit test Java class that loads native library

前端 未结 8 707
自闭症患者
自闭症患者 2021-02-01 11:49

I\'m running unit tests in Android Studio. I have a Java class that loads a native library with the following code

 static
    {
       System.loadLibrary(\"myli         


        
8条回答
  •  灰色年华
    2021-02-01 12:52

    The .so files are to be placed under

    src/main/jniLibs

    Not under src/main/libs

    (Tested with Android Studio 1.2.2)

    For reference check the page - http://ph0b.com/android-studio-gradle-and-ndk-integration/, though some portions might be outdated.

提交回复
热议问题