Unit test Java class that loads native library

前端 未结 8 711
自闭症患者
自闭症患者 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:40

    The only solution I found that works without hacks is to use JUnit through instrumentation testing (androidTest directory). My class can now be tested fine but with help of the android device or emulator.

提交回复
热议问题