Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I access sdk/ndk paths in my gradle build scripts?

In Android Studio 1.3.2, I have set sdk.dir and ndk.dir set in local.properties, but how can I access them within my gradle build scripts?

What I want to do is call ndk-build manually without having to hard code a path to the ndk-build, which now is in a known location at sdk/ndk-bundle/ndk-build. Are these path variables exposed, or, how can I expose them?

like image 992
Brian D Avatar asked Sep 24 '15 00:09

Brian D


Video Answer


1 Answers

You can get the ndk.dir by android.ndkDirectory. Look at this answer to see how you can call ndk-build from gradle: https://stackoverflow.com/a/28566337/3836816

like image 52
Prim Avatar answered Oct 06 '22 00:10

Prim