Problems with module integration with so packages

A few days ago, a project for living body recognition was added to the project as a dependency of the project. The addition method was integrated in the form of a module. After rewriting a small part of the function to meet the requirements, it was no problem to test it with your own oppo mobile phone. At the same time There is no problem after testing with Samsung's test machine, and colleagues around have no feedback about problems.

However, a few days before it was about to go online, there was a sudden feedback that there would be a crash, and the crash information was similar to the following:

The so package was not found, the vivo model did not find the so package, and other models have no problem, try to add the so package in the dependent module to the corresponding folder under jniLibs in the main project:

Resynchronize the project gradle and run the release package test. The model that reported the crash before the test is no longer crashing, and the model that did not have a problem before the test does not have a problem.

It should be noted that when integrating a module with so packages, different models may have different rules for finding so packages, so you need to put the so package under the main project, so that even if there are two copies of the same so package during compilation, only compile One package, and it is guaranteed that the so package can be found in different models.

Guess you like

Origin blog.csdn.net/new_acm_/article/details/114539229