-
-
Notifications
You must be signed in to change notification settings - Fork 307
Description
Describe the bug I am facing a critical issue where I cannot successfully build and run my app with AdMob on Android using any recent Solar2D version.
On Recent Daily Builds (2025.3715, 2025.3726): The Android build completes successfully, but the app crashes immediately at runtime or when loading ads. The error log shows that the AdMob native library is missing from the package: dlopen failed: library "libplugin.admob.so" not found. I have verified that the .so file is indeed missing from the local Plugins folder (only Lua files are present).
On Stable Release (2024.3706): I attempted to downgrade to the stable version to avoid the above issue. However, the build fails with a Gradle error: Could not find com.beust:klaxon:5.0.1. This seems to be due to the android-template still relying on the defunct JCenter repository without falling back to MavenCentral.
To Reproduce Scenario A (Runtime Crash on Recent Builds):
Using Solar2D Simulator 2025.3715 or 2025.3726 (macOS).
Add ["plugin.admob"] = { publisherId = "com.coronalabs" } to
build.settings
.
Build for Android (APK or Bundle).
Install and run on an Android device.
Observe crash/error in adb logcat: nativeloader: ... dlopen failed: library "libplugin.admob.so" not found.
Scenario B (Build Failure on Stable):
Using Solar2D Simulator 2024.3706.
Attempt to build the same project for Android.
Build fails with: Could not resolution all files for configuration 'classpath'. > Could not find com.beust:klaxon:5.0.1.
Target platform and where build was made:
Build Host: macOS Sequoia (15.x)
Target Device: Android 13/14 (Tested on Galaxy S21)
Solar2D Versions Tested: 2025.3726 (Crash), 2025.3715 (Crash), 2025.3709 (Crash), 2024.3706 (Build Fail)
Additional context
Checked
build.settings
for useAndroidX = true (tried false as well, no luck).
Tried enabling multidexEnabled = true, but it's reported as an "unrecognized key" in the simulator console on recent builds.
Tried clearing Gradle caches ~/.gradle/caches/ and Simulator Plugins folder.
The issue seems to be that recent builds are fetching the AdMob dependency via Gradle but failing to package the native .so library into the APK.
whole test project or build.settings Relevant part of
build.settings
:
lua
settings =
{
android =
{
useAndroidX = true,
usesCleartextTraffic = true,
applicationChildElements =
{
[[
]],
},
},
plugins =
{
["plugin.admob"] = {
publisherId = "com.coronalabs",
},
},
}
Good