android - NDK UnsatisfiedLinkError when lowering project api level 21 to 19 -


i made project using ndk api level 21. reasons, downgraded project api level 21 19.

my project worked fine in api 21, after downgrading project gives error in ndk part.

this error code when project runs system.loadlibrary("serial_port");.

androidruntime: java.lang.unsatisfiedlinkerror: dlopen failed: cannot locate symbol "tcgetattr" referenced "libserial_port.so"... androidruntime:     @ java.lang.runtime.loadlibrary(runtime.java:364) androidruntime:     @ java.lang.system.loadlibrary(system.java:526) androidruntime:     @ com.josh.mainselection.uartui.oncreate(uartui.java:220) androidruntime:     @ android.app.activity.performcreate(activity.java:5231) androidruntime:     @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1087) androidruntime:     @ android.app.activitythread.performlaunchactivity(activitythread.java:2148) androidruntime:     @ android.app.activitythread.handlelaunchactivity(activitythread.java:2233) androidruntime:     @ android.app.activitythread.access$800(activitythread.java:135) androidruntime:     @ android.app.activitythread$h.handlemessage(activitythread.java:1196) androidruntime:     @ android.os.handler.dispatchmessage(handler.java:102) androidruntime:     @ android.os.looper.loop(looper.java:136) androidruntime:     @ android.app.activitythread.main(activitythread.java:5001) androidruntime:     @ java.lang.reflect.method.invokenative(native method) androidruntime:     @ java.lang.reflect.method.invoke(method.java:515) androidruntime:     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:811) androidruntime:     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:627) androidruntime:     @ dalvik.system.nativestart.main(native method) 

i'm first using ndk, , i'm not able figure problem. please me solving error.

i'm using gradle-experimental:0.4.0.

this made me crazy.

my compilesdkversion 23

but solve now.

you can see diff of termios.h file between api 19 , 21+.

so, copy termios.h d:\android\sdk\ndk-bundle\platforms\android-19\arch-arm\usr\include jni folder, , works.


Comments