Android cannot load the library when the lib project has the armeabi and armeabi-v7a directories in the libs directory

I have an android project which depends on the lib project. And in the lib project there is a directory “armeabi” and “armeabi-v7a” in the directory “libs”, and both of them have a .so file inside. And my own project only has the armeabi directory in the libs directory with the internal .so file.

Then I found that when I run my project on the armeabi-v7a device, it will work. He says that he cannot load the library into the journal. It looks like the application is trying to download .so from the "armeabi-v7a" directory, but it doesn’t. Then I created the "armeabi-v7a" directory in the libs directory in my own project and copied the .so file to the new directory and the application will be fine.

But this will increase the apk package size, is there any way for the application to download the .so file to the "armeabi" directory? Or can I delete the directory "armeabi-v7a" in the lib project? It seems to be normal ...

+4
source share
1 answer

If you need to support both armeabi and armeabi-v7a , just remove armeabi-v7a lib from the library project.

But if you can refuse to support armeabi , then remove armeabi lib from the library project and in your main project move armeabi lib to the new armeabi-v7a . Note: if you do this, make a note of this unconfirmed error report.

You can learn more about this in my answer here .

0
source

Source: https://habr.com/ru/post/1497158/


All Articles