Xamarin.Android集成Wikitude 8.6.0加载即时跟踪示例崩溃问题
The error you're hitting is a classic runtime dependency mismatch—your code is trying to call a method that existed in the ARCore version you built against, but is missing in the ARCore version running on the device or bundled with your app. Let's break down how to fix this:
Root Cause
Wikitude SDK 8.6.0 relies on ARCore 1.12.0 or higher, which introduced the setLightEstimationMode method in com.google.ar.core.Config. If your project uses an older ARCore NuGet package, or the device has an outdated ARCore app installed, the runtime won't find this method, triggering the crash. Non-AR samples work because they don't rely on ARCore at all.
Step-by-Step Solutions
1. Update Your ARCore NuGet Package
First, make sure your project uses an ARCore version compatible with Wikitude 8.6.0:
- Open your solution in Visual Studio.
- Head to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
- Search for
Xamarin.Google.ARCore. - Update the package to at least version 1.12.0 (the minimum required by Wikitude 8.6.0). If possible, grab the latest stable version that plays nice with your project.
2. Enforce Minimum ARCore Version in AndroidManifest
Add or tweak this meta-data tag in your AndroidManifest.xml to ensure the device has a compatible ARCore version:
<meta-data android:name="com.google.ar.core.min_apk_version" android:value="11200000" />
The value 11200000 maps directly to ARCore 1.12.0. This tells Android to block the app from running on devices with an older ARCore version installed.
3. Update ARCore on Your Test Device
Outdated system-installed ARCore can cause conflicts even if your app bundles a newer version:
- On your test device, go to the Google Play Store and update the Google Play Services for AR app to the latest version.
- For end-users, you can lean into the ARCore check you already have to prompt them to update if their version is outdated.
4. Resolve Dependency Conflicts
Sometimes other NuGet packages in your project might pull in an older ARCore version without you noticing:
- Use the Consolidate feature in the NuGet Package Manager to make sure all projects in your solution use the same ARCore version.
- Check the Package Manager Console for warning messages about conflicting dependencies—these can point you to the source of the issue.
Verification Steps
After applying these fixes:
- Clean your solution, then rebuild it from scratch.
- Test the Instant Tracking sample again.
- If the crash still happens, check logcat for updated error messages—this might hint at a different dependency problem that needs addressing.
Content of the question来源于stack exchange,提问作者Davids

