Problems encountered in integrating.so with Android Studio: about java.lang.unsatisfiedlinkerror: native method not found

Open source software supply chain lighting plan, waiting for you>>>

What I debug is a serial port program. I need to inherit the. So file in the program. The way to integrate the. So file in Android studio is to copy the folder where. So is stored (usually the folder name is: armeabi) to the LIBS folder of the app, and then add the following code to the build. Gradle folder under the app: (this code is included in the Android {})

 sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

But in the process, I met the following problems., Screenshot:

My solution is to rename the armeabi in the LIBS folder to armeabi-v7a and rebuild the project

The differences between armeabi and armeabi-v7a are as follows: armeabi and armeabi-v7a represent the type of CPU. We know that most mobile phones or tablets use ARM CPU (MIPs is tragically ignored). The characteristics of different CPUs are different. Armeabi is for ordinary or old ARM CPU, and armeabi-v7a is for ARM CPU with floating-point operation or advanced extension function

I hope the memo can help you

Similar Posts: