Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the abiFilters property in a build.gradle file?

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?
like image 293
Liron Yahdav Avatar asked Sep 10 '16 02:09

Liron Yahdav


People also ask

How would you specify in your build gradle file?

You can do this by adding extra properties to the ext block in the top-level build.gradle file. // of properties you can define. // You can also create properties to specify versions for dependencies.

What is EXT in build gradle?

Extra properties extensions allow new properties to be added to existing domain objects. They act like maps, allowing the storage of arbitrary key/value pairs. All ExtensionAware Gradle domain objects intrinsically have an extension named “ ext ” of this type.

What is Abi filter in Android?

Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has its own Application Binary Interface (ABI). An ABI includes the following information: The CPU instruction set (and extensions) that can be used.

What is gradle properties in Android Studio?

Gradle properties By default, Gradle uses a file called gradle. properties in the root directory for Android Projects. This extension file is widely used in Java projects, so it is also used for Android projects. The file has a simple key — value data structure.


1 Answers

  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.

like image 166
ph0b Avatar answered Oct 03 '22 12:10

ph0b