1

When I compile my Android native library within VS 2017, here is what it displays:

1>------ Rebuild All started: Project: MyNativeAndroid, Configuration: Debug x86 ------
1>ANDROID_HOME=C:\ProgramData\Microsoft\AndroidSDK\25
1>ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Apps\apache-ant-1.9.3
1>JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
1>NDK_ROOT=C:\\Microsoft\AndroidNDK64\android-ndk-r13b

None of these variables are defined in my system environment.

I need to update NDK_ROOT to be set to C:\Microsoft\AndroidNDK64\android-ndk-17b.

It appears I need to update a global macro $(LLVMToolchainPrebuiltRoot) for this purpose. This macro is also being used by C++ include path.

How does one modify this macro?

Peter
  • 11,260
  • 14
  • 78
  • 155

1 Answers1

0

You can modifiy part of the $(LLVMToolchainPrebuiltRoot), macro by setting the ndk path (which is what you want in your case), by going to:

Tools->Options->Cross Platform->C++->Android

Then change the Android NDK path to your ndk path (in your case: C:\Microsoft\AndroidNDK64\android-ndk-17b)

Gideon Gyabaah
  • 388
  • 2
  • 7