You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法构建Google Vulkan纹理示例tutorial6,求解决方案

构建Android Vulkan教程tutorial6失败求助

尝试构建Google仓库android-vulkan-tutorials中的tutorial6(带纹理的三角形绘制示例)时始终无法完成构建,报错信息如下:

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\gmmo\android-vulkan-tutorials-master\tutorial06_texture\app\.cxx\Debug\2b51h276\arm64-v8a'
  
  C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\gmmo\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
        -C ^
        "C:\\gmmo\\android-vulkan-tutorials-master\\tutorial06_texture\\app\\.cxx\\Debug\\2b51h276\\arm64-v8a" ^
        vktuts
    from C:\gmmo\android-vulkan-tutorials-master\tutorial06_texture\app
  ninja: error: 'C:/gmmo/android-vulkan-tutorials-master/tutorial06_texture/app/src/main/cpp/shaderc/libs/c++_static/arm64-v8a/libshaderc.a', needed by 'C:/gmmo/android-vulkan-tutorials-master/tutorial06_texture/app/build/intermediates/cxx/Debug/2b51h276/obj/arm64-v8a/libvktuts.so', missing and no known rule to make it

已知其他用户也遇到该问题,临时解决方法是修改gradle中的abiFilters配置,移除'armeabi-v7a':
原配置:

abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'

修改为:

abiFilters 'arm64-v8a', 'x86', 'x86_64'

但我尝试此操作后依然无效。奇怪的是,下载同仓库中的tutorial5(无纹理三角形示例)可以正常构建。

现寻求解决建议;若你使用Android Studio Dolphin版本,能否拉取代码尝试构建并告知是否遇到相同问题?

我的Android Studio环境信息(PC端):

Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 29, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 16
Registry:
    external.system.auto.import.disabled=true
    ide.text.editor.with.preview.show.floating.toolbar=false

Non-Bundled Plugins:
    com.intellij.plugins.visualstudiokeymap (213.5744.3)
    GLSL (1.21)

内容的提问来源于stack exchange,提问作者gmmo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.29 00:53:12