NDK builds, this macro is always defined.Ĭontent and code samples on this page are subject to the licenses described in the Content License. This macro isĭefined automatically by Clang, so no header needs to be included to use it. Identical, but prefer the former because its meaning is clearer). Via the _ANDROID_MIN_SDK_VERSION_ macro (the legacy _ANDROID_API_ is The minSdkVersion of your application is made available to the preprocessor To be installed on older devices, but your NDK code may not work. This is the lowest API level supported by the NDK.ĭo not set your app's minSdkVersion lower than this. Note: The NDK has its own minSdkVersion defined in The Play console has metrics specific to yourĪpp's user distribution. Longer worth the maintenance costs, or lower it if your users demand it and it's The more time you'll spend working around old bugs and adding fallback behaviorsįor features that weren't implemented yet.įor an existing app, raise your minSdkVersion whenever old API levels are no Potential market share and maintenance costs. Not guaranteed to work, and may not on other NDK versions, OS versions, orįor a new app, see the user distribution data in Android Studio's New Project Warning: Your app might work on older devices even if your native librariesĪre built with a newer minSdkVersion. Still governs the minimum supported OS version of your code. Even if you do not use any new APIs, this property (such as GNU hashes or RELR) for your binaries that are not compatible with For example, this property determines which FORTIFYįeatures are used in libc, and may also enable performance or size improvements The minSdkVersion is used by the NDK to determine what features may be used The minSdkVersion set in your adle file determines which APIs areĪvailable at build time (see compileSdkVersion to understand why this differsįrom Java builds), and determines the minimum version of the OS that your code This property has no effect on NDK builds. * See also android_get_application_target_sdk_version(). * and is equivalent to the Java `_INT` API. * Returns the API level of the device we're actually running on, or -1 on failure. This function has the following signature: /** Level of the device your application is running on by callingĪndroid_get_device_api_level(). Other behavior changes might depend on the device API level. Int android_get_application_target_sdk_version() _INTRODUCED_IN(24) * See also android_get_device_api_level(). * and is equivalent to the AndroidManifest.xml `targetSdkVersion`. * The returned values correspond to the named constants in ``, * there is no known target SDK version (for code not running in the context of * Returns the `targetSdkVersion` of the caller, or `_ANDROID_API_FUTURE_` if While application developers generally know their app's targetSdkVersion, thisĪPI is useful for library developers that cannot know which targetSdkVersionĪt runtime, you can get the targetSdkVersion used by an application by callingĪndroid_get_application_target_sdk_version(). This to the latest version when convenient (after updating compileSdkVersion). Behavior changes in the system are, when feasible, onlyĪpplied to apps with a targetSdkVersion greater than or equal to the OS Similar to Java, the targetSdkVersion of your app can change the runtimeīehavior of native code. This to the latest version when convenient. Not have the newer API, regardless of whether or not those APIs will be called.įor a new app, choose the newest version available. MinSdkVersion will cause the library to fail to load on OS versions that do Using any symbols that are not available in the Resolved at library load time rather than lazily resolved when first called (as Those properties mean for the application in general. The Android adle documentation explains what Android applications can set a number of SDK version properties in theirīadle file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |