Vulkan-Samples icon indicating copy to clipboard operation
Vulkan-Samples copied to clipboard

gradle assemble[Release/Debug] throwing 'NDK not installed' error

Open ritzdzire opened this issue 3 years ago • 3 comments

C:..\Vulkan-Samples\build\android_gradle>gradle assembleDebug

FAILURE: Build failed with an exception.

  • Where: Build file 'C:..\Vulkan-Samples\build\android_gradle\app\build.gradle' line: 56

  • What went wrong: A problem occurred evaluating project ':app'.

NDK is not installed

[Env Variables] ANDROID_HOME= ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.0.8775105 PATH=$PATH:$ANDROID_HOME/cmake/3.22.1 GRADLE_HOME=

ritzdzire avatar Jul 31 '22 19:07 ritzdzire

Able to generate the apk by giving ndk relative path in below instruction in app/build.gradle file. jniLibs.srcDirs += ["../../../../../../../sdks/android_sdk/ndk/25.0.8775105/sources/third_party/vulkan/src/build-android/jniLibs"]

however, none of the samples are running in launched app.

ritzdzire avatar Jul 31 '22 21:07 ritzdzire

How are you installing the samples? It's possible that the assets didn't get copied over, see https://github.com/KhronosGroup/Vulkan-Samples/blob/master/docs/build.md#3d-models how to manually do that.

SaschaWillems avatar Aug 02 '22 14:08 SaschaWillems

In your environment variables, it looks like ANDROID_HOME is getting set to nothing as is GRADLE_HOME. Could you confirm that those are indeed pointing to the full path to your android_sdk directory (could be ~/sdks/android_sdk)

gpx1000 avatar Aug 02 '22 14:08 gpx1000

Hi @ritzdzire, any updates on this? The above suggestion fix the problem? Would like to close this out shortly unless there's more to do. Thanks!

marty-johnson59 avatar Aug 30 '22 21:08 marty-johnson59

Closing. LMK if there's more to do and we can reopen. Thanks.

marty-johnson59 avatar Sep 12 '22 16:09 marty-johnson59