Whats NDK (side-by-side) in android sdk?
Asked Answered
S

3

71

There's a ndk (side-by-side) at the sdk manager. Is it needed to install or just need to install the ndk?

Saccule answered 28/5, 2019 at 8:18 Comment(2)
the link did not explain about the "side-by-side" part.Saccule
@ADM Agree with Daniel, that isn't a valid dupe target. They already have NDK installed (second from bottom at root level)Etienne
K
51

This is how it looks like in my Android Studio 3.5 beta2:

enter image description here

You can see that I don't hide obsolete packages and request package details. Now we see that the old NDK package is replaced by the new NDK (Side by side), which allows to keep both NDK r19 and r20.

The reason why they are making the change is that switching to the latest version of NDK is not always painless, and many developers prefer to stay with an older version, at least for some projects.

The bottom line is that it is OK to use the NDK that you have installed, but it will be replaced with the new package some time later when you upgrade the Android Studio.

Killjoy answered 28/5, 2019 at 19:4 Comment(2)
Does this mean I will have to set NDK path to a specific one and keep it updated with every NDK release? Earlier NDK path was set to sdk_folder/ndk-bundle. How there's sdk_folder/ndk/ndkVersion.Genoa
Android Studio will handle the paths for you. If you don't specify android.ndkVersion '19.2.5345600' or similar, it will pick up the latest NDK.Killjoy
M
11

NDK (Side by side) is irrelevant for Android Gradle Plugin earlier than 3.5. However, the components available for download by SDK manager aren't customizable based on Android Gradle Plugin version so the side by side NDKs will appear.

Starting in 3.5, you can specify a particular version of NDK in your build.gradle by setting, for example:

android.ndkVersion '19.2.5345600'

The non side by side NDK has been marked as obsolete. Which means it won't appear in the SDK manager list unless you uncheck Hide obsolete packages --or-- you already have that NDK installed locally.

Mahatma answered 3/6, 2019 at 22:6 Comment(2)
T
6

According to Android Studio 3.5 release document, it says: "Android Studio 3.5 allows you to use multiple versions of the Android NDK side-by-side in your build.gradle file. This should allow you to have more reproducible builds and mitigate incompatibilities between NDK versions and the Android gradle plugin." I think side by side means you may use multiple NDK versions simultaneously. It is a new version to replace the ndk bundle version.

Tiresome answered 29/9, 2019 at 11:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.