What is the abiFilters property in a build.gradle

2019-05-04 10:22发布

问题:

I found documentation on what ABI is, but I can't find any documentation on what the ndk.abiFilters property does exactly. A couple questions specifically:

  1. If I set that property, are the ABIs listed not allowed to run the app? Or is it a filter of the allowed ABIs?
  2. What happens if I run the app on a device that doesn't support the filtered ABIs?

回答1:

  1. The ABIs listed are the only one to be supported in the app.
  2. The app will not even be installed. The process will fail with this error: INSTALL_FAILED_NO_MATCHING_ABIS

These answers are valid only if you have .so libraries inside your apk: If you don't have any .so files packaged in your apk, the ndk.abiFilters will not do anything.