gpt4 book ai didi

android - 在 MS Windows 下获取可用的 Android Vulkan 示例

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:43:34 31 4
gpt4 key购买 nike

我想在 MS WIndows 10 中的 Android Studio 下测试 Android Vulkan 示例使用本手册 https://developer.android.com/ndk/guides/graphics/getting-started

因为错误我做不到

Device supports x86, but APK only supports armeabi-v7a

我已经尝试了此处建议的所有选项 What is the reason for the error "Device supports x86, but APK only supports armeabi-v7a"但它不起作用。

我有以下虚拟设备

enter image description here

enter image description here

即使我使用 armeabi-v7a 我也无法启动应用程序。而且速度极慢。

请帮助我使用明确的步骤在 Android 的 x86 图像下获得工作的 Vulkan 示例。谢谢!

enter image description here

最佳答案

这里有几个不同的问题:

首先,“设备支持 x86_64、x86,但 APK 仅支持 armeabi-v7a”的意思就是它听起来的意思:您有一个只支持 32 位和 64 位 x86 指令集的模拟器,但是APK 中的 native 代码仅为 32 位 ARM 编译。模拟 x86 设备要快得多,因为它们可以在虚拟机中运行(主机 CPU 实际上是直接执行模拟器指令,而不是必须在软件中一个一个地翻译它们)。配置您的项目以构建除 armeabi-v7a 之外的 x86 native 代码。

其次,当使用 ARM 模拟器时,或者如果您解决了第一个问题并在 x86 模拟器上运行,我认为 Android 模拟器还不能模拟支持 Vulkan 的 GPU。因此,您应该能够创建一个 Vulkan 实例,但是 vkEnumeratePhysicalDevices 应该返回零可用物理设备的计数。

您没有提供有关“无法启动应用程序”的任何详细信息:您在日志中看到了什么吗?你能创建一个实例吗?还是在您到达那一点之前还有其他一些完全不相关的问题?如果没有更多详细信息,没有人可以帮助您。

关于android - 在 MS Windows 下获取可用的 Android Vulkan 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52713073/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com