Assistance Needed: Issue with C API Samples and SDK Compatibility in Magic Leap 2

Dear Community,

I hope this message finds you all well.

I am currently working on native development for Android using the C API Samples downloaded via the Magic Leap Hub. My goal is to delve deeper into the capabilities of the Magic Leap 2 platform.

However, I've encountered an issue regarding the compatibility of the samples with the Magic Leap SDK version (v1.2.0) that I'm using.

Here are the details of my setup:

ML2 OS version: v1.2.0

MLSDK version: v1.2.0

Host OS: Windows

Upon loading all the samples in the latest version of Android Studio, it appears that the samples may be outdated relative to the SDK version. Error messages from logs are as follows:

I have also attached screenshots to provide a visual context of the issues I'm experiencing.

I would greatly appreciate any guidance or directions to updated examples compatible with the latest SDK. I have also tried all SDKs one by one but code has issues as functions, params are unknown or not defined.

Thank you for your time and assistance.

Best Regards,

@usman.bashir Did you include logs in the message?

Here are the logs;

[CXX1405] error when building with cmake using C:\Users\Ottoman\MagicLeap\mlsdk\v1.2.0\samples\c_api\samples\simple_gl_app\app\src\main\cpp\CMakeLists.txt: Build command failed.
Error while executing process C:\Program Files\CMake\bin\cmake.exe with arguments {-HC:\Users\Ottoman\MagicLeap\mlsdk\v1.2.0\samples\c_api\samples\simple_gl_app\app\src\main\cpp -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=29 -DANDROID_PLATFORM=android-29 -DANDROID_ABI=x86_64 -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DANDROID_NDK=C:\Users\Ottoman\AppData\Local\Android\Sdk\ndk\25.0.8775105 -DCMAKE_ANDROID_NDK=C:\Users\Ottoman\AppData\Local\Android\Sdk\ndk\25.0.8775105 -DCMAKE_TOOLCHAIN_FILE=C:\Users\Ottoman\AppData\Local\Android\Sdk\ndk\25.0.8775105\build\cmake\android.toolchain.cmake -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ottoman\MagicLeap\mlsdk\v1.2.0\samples\c_api\samples\simple_gl_app\app\build\intermediates\cxx\Debug\512w576i\obj\x86_64 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\Users\Ottoman\MagicLeap\mlsdk\v1.2.0\samples\c_api\samples\simple_gl_app\app\build\intermediates\cxx\Debug\512w576i\obj\x86_64 -DCMAKE_BUILD_TYPE=Debug -BC:\Users\Ottoman\MagicLeap\mlsdk\v1.2.0\samples\c_api\samples\simple_gl_app\app\.cxx\Debug\512w576i\x86_64 -GNinja -DANDROID_STL=c++_static}
-- Configuring incomplete, errors occurred!
See also "C:/Users/Ottoman/MagicLeap/mlsdk/v1.2.0/samples/c_api/samples/simple_gl_app/app/.cxx/Debug/512w576i/x86_64/CMakeFiles/CMakeOutput.log".

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

@usman.bashir Based on some of those logs, can you verify the following?

Specifically, Command Line Workflow | MagicLeap Developer Documentation and Android Studio Workflow | MagicLeap Developer Documentation .

Thank you for your responses. I can confirm that all the necessary Android SDK tools have been successfully installed. I have thoroughly reviewed the Native Setup Overview documentation from Magic Leap 2 and ensured that the installation process was followed correctly.

I am attaching screenshots for your review;

NDK:

SDK Tools:

Usman, are you still having issues building native samples?

No, currently I am not actively engaged in any work. We have started working on unity production environment.