error: undefined symbol: cesium_sqlite3_open
error: undefined symbol: cesium_sqlite3_close_v2
error: undefined symbol: cesium_sqlite3_exec
error: undefined symbol: cesium_sqlite3_finalize
error: undefined symbol: cesium_sqlite3_errstr
how to fix it ?
We’re going to need more context. What were you doing when you get these errors? Building the plugin? Packaging a game? Something else? Also please provide more of the build output, not just the errors.
The Cesium sample builds well for Android.
But my project fails to build.
The shipping build error is as follows.
UATHelper: Packaging (Android (ASTC)): ld.lld: error: undefined symbol: cesium_sqlite3_open
UATHelper: Packaging (Android (ASTC)): >>> referenced by SqliteCache.cpp
UATHelper: Packaging (Android (ASTC)): >>> SqliteCache.cpp.o:(CesiumAsync::SqliteCache::createConnection() const) in archive
D:/myProject/Plugins/CesiumForUnreal/Source/ThirdParty/lib/Android-xaarch64/libCesiumAsync.a
Most likely the problem is that you’re targeting ARM7. That’s a 32-bit platform, and Cesium for Unreal only supports 64-bit platforms. Change the target to ARMv8 and I think you’ll be set.
I am using UE 5.1.
built with arm64 [aka arm64-8a]
(UE 5.1 doesn’t seem to support 32-bit Android)
Based on the path in your build log, it looks like Cesium for Unreal is embedded in your project. Since you’ve done that, you also must properly build and install cesium-native for Android before you can package a plugin for Android. Have you done that?
It may help to see how our CI system does it:
fetch-depth: 0 # so that `git describe` works.
- name: Set environment variables
run: |
$ENV:CESIUM_UNREAL_VERSION=$(git describe)
$ENV:BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-51-android-${ENV:CESIUM_UNREAL_VERSION}"
# Make these available to subsequent steps
echo "CESIUM_UNREAL_VERSION=${ENV:CESIUM_UNREAL_VERSION}" >> $ENV:GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${ENV:BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> $ENV:GITHUB_ENV
- name: Install nasm
uses: ilammy/setup-nasm@v1.4.0
- name: Build cesium-native
run: |
cd extern
cmake -B build-android -S . -G Ninja -DCMAKE_TOOLCHAIN_FILE="unreal-android-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-android --config Release --target install -j8
- name: Build plugin
run: |
((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.0.0"','"EngineVersion": "5.1.0"') | Set-Content -Path CesiumForUnreal.uplugin
# UE 5.1 seems to have a bug where the Android precompiled files are in the wrong place.
# See https://forums.unrealengine.com/t/5-1-missing-precompiled-manifest-error-when-building-code-plugin-for-android/691983
# So we fix it here.
hi song_mars ,did u fix it?