Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I properly install the libshaderc component to run Vulkan example code in Android Studio?

Whenever I try to build the Vulkan samples in Android Studio, I get the following error:

Error:error: 'C:/Users/****/AppData/Local/Android/sdk/ndk-bundle/sources/third_party/shaderc/libs/gnustl_static/x86/libshaderc.a', needed by '../../../../build/intermediates/cmake/debug/obj/x86/libvulkan_sample.so', missing and no known rule to make it

I've tried compiling the shaders ahead of time, and following the setup directions, yet I cannot seem to overcome this issue. I have no gnustl-static directory in my libs folder. How do I install it?

like image 787
Jack Avatar asked Oct 21 '25 12:10

Jack


1 Answers

I came up with the same problem, According to: https://developer.android.google.cn/ndk/guides/graphics/getting-started.html

In $NDK\sources\third_party\shaderc, excute:

..\..\..\ndk-build.cmd NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_STL:=gnustl_static APP_ABI=x86 libshaderc_combined

will generate libshaderc.a

like image 96
Jiangty Avatar answered Oct 23 '25 08:10

Jiangty



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!