Xamarin.Android "XA0030: ... TargetFrameworkVersion ... not installed" in CI
A Xamarin.Android project pins a TargetFrameworkVersion mapping to an Android API level. The build fails when the SDK platform for that API is not installed on the runner, so the Android framework cannot be found.
What this error means
A Xamarin.Android build fails reporting the project TargetFrameworkVersion (an Android API level) is not installed, and asks you to install that platform or retarget.
error XA0030: Building with JDK version is not supported, or the requested
TargetFrameworkVersion 'v13.0' is not installed. Install the Android SDK platform
for API level 33, or change the project TargetFrameworkVersion.Common causes
The target API platform is not installed
The project targets an Android API level whose SDK platform is absent on the runner, so the framework is missing.
A mismatch between project target and runner SDK
The runner image ships different API platforms than the project pins, leaving the target version uninstalled.
How to fix it
Install the target platform
- Map the
TargetFrameworkVersionto its API level. - Install that platform with sdkmanager.
- Rebuild against the now-installed framework.
sdkmanager "platforms;android-33"
msbuild MyApp.Android/MyApp.Android.csproj /p:Configuration=ReleaseRetarget to an installed API level
If a platform is unavailable, set the project to an API level the runner already has.
<TargetFrameworkVersion>v13.0</TargetFrameworkVersion>How to prevent it
- Install the exact Android platform the project targets in CI.
- Keep
TargetFrameworkVersionaligned with available platforms. - Pin the runner image so SDK platforms are predictable.