Android-开始使用Vulkan-未生成教程中提到的项目文件

发布于 2025-01-25 23:11:20 字数 1228 浏览 2 评论 0原文

我正在关注Google的本教程,从Vulkan开始。

https://developer.android.com/ndk/guides/graphics/getting-开始

在步骤4中,我生成了Android样本项目,该项目显然根据终端中的输出效果很好。

$ ./bldsys/scripts/generate_android_gradle.sh
-- Android Gradle Project (With Native Support) generated at:
    /Users/elliptic1/workspace/Vulkan-Samples/build/android_gradle

在步骤5上,我能够打开项目并找到提到的确切文件

vulkan-samples/build/android_gradle/build.gradle.gradle

但是当它说<时,我就迷路了 应该看到与以下类似的内容

代码>您 。

​“ rel =“ nofollow noreferrer”> “在此处输入图像描述”

并通过终端查看目录,i可以看到这些文件和dir不存在。 清单javacpp不存在。例如,我有任何CPP目录吗?我有这些:

$ find . -name cpp                                
./third_party/spirv-cross/samples/cpp
./third_party/imgui/misc/cpp

所以我的问题是,我在某个地方没有错,还是这个教程过时了?某处有更新版本吗?

I'm following this tutorial from Google on getting started with Vulkan.

https://developer.android.com/ndk/guides/graphics/getting-started

On Step 4, I generate the Android sample project, which apparently works fine according to the output in the terminal.

Step 4

$ ./bldsys/scripts/generate_android_gradle.sh
-- Android Gradle Project (With Native Support) generated at:
    /Users/elliptic1/workspace/Vulkan-Samples/build/android_gradle

On Step 5, I'm able to open the project and find the exact file mentioned

Vulkan-Samples/build/android_gradle/build.gradle

But I get lost when it says You should see something similar to the following

enter image description here

I do not see that, instead, I see

enter image description here

And looking in the directories via the terminal, I can see that those files and dirs are not there.
manifests, java, cpp are not there. Do I have any cpp directories, for example? I have these:

$ find . -name cpp                                
./third_party/spirv-cross/samples/cpp
./third_party/imgui/misc/cpp

So my question is, have I don't something wrong somewhere, or is this tutorial out of date? Is there an updated version somewhere?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尛丟丟 2025-02-01 23:11:20

我认为,我认为,

对我来说,Gradle Build认为NDK没有安装。

为我生成的local.properties文件具有指向Android SDK的条目。

这是我的build/android_gradle/local.properties文件的主要部分:

#Mon Jun 13 15:11:38 EDT 2022
sdk.dir=/Users/dneto/Library/Android/sdk

当我将其修改为也设置ndk.dir时,我的构建工作:

#Mon Jun 13 15:11:38 EDT 2022
sdk.dir=/Users/dneto/Library/Android/sdk
ndk.dir=/Users/dneto/Library/Android/sdk/ndk/24.0.8215888

我不知道为什么需要此额外的步骤。这似乎是沿线某个地方的错误。

I can reproduce your problem, I think,

For me, the Gradle build thinks the NDK is not installed.

The local.properties file that was generated for me has an entry to point at the Android SDK.

This is the main part of my build/android_gradle/local.properties file:

#Mon Jun 13 15:11:38 EDT 2022
sdk.dir=/Users/dneto/Library/Android/sdk

When I modify it to also set ndk.dir, my build works:

#Mon Jun 13 15:11:38 EDT 2022
sdk.dir=/Users/dneto/Library/Android/sdk
ndk.dir=/Users/dneto/Library/Android/sdk/ndk/24.0.8215888

I don't know why this extra step is needed. It seems like a bug somewhere along the line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文