Pixel 4a - 找不到 ARCore,即使它说它已经下载

Pixel 4a - Can't find ARCore even though it says it's already downloaded

Pixel 4a 随附 ARCore 并且在支持的设备列表中

https://developers.google.com/ar/discover/supported-devices

然而,当我尝试加载 ArFragment 时

 <fragment
            android:id="@+id/ar_fragment"
            android:name="com.google.ar.sceneform.ux.ArFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

它一直提示我下载 ARCore,当我试图在 playstore 中找到 ARCore 时,它​​不在那里。

似乎无法通过谷歌搜索找到有关此问题的任何信息。

我的 targetSdkVersion30,在将其更改为 targetSdkVersion 29 后,正在检测 ARcore 库。

您的问题可能与 Sceneform 与最新目标 SDK 版本 (30) 不兼容有关

Sceneform 在存档时以 ARCore 1.16 为目标,而 ARCore 当前版本是 1.27!

由于 ARCore 在设备上安装了自己的解耦服务: Google Play Services for AR

就像 Google Play 服务一样,有时针对旧版本服务的旧应用程序不再工作。

请参阅 AR sceneform activity crashes 以了解另一个看起来像您的崩溃的示例(也与此 Sceneform 问题相关)。

您的 Sceneform 替代品包括:

  • ARCore SDK for Android: Scratch Sceneform and work directly with ARCore, but that would require you to work with OpenGL.
  • Google ARCore SDK for Unity: If you know about Unity
  • Sceneform Maintained Android SDK: [a repository which I maintain] Based on Sceneform with latest compatibly and functionalities from Android (including androidx**), ARCore and Filament. Currently a small community is working on it to keep it up to date and to develop new features.

⠀⠀⠀⠀引自Sceada's answer to: "Sceneform Dependencies for 1.16.0 (Not AndroidX Compatible)”,版权2021-10-11,已修改说明我维护Sceneform Maintained Android SDK.

我还建议你看看我写的文章,Make an Android AR app in 2022,它概述了 Sceneform Maintained Android SDK,我维护的 Sceneform 替代品。