diff --git a/.github/workflows/agp-matrix.yml b/.github/workflows/agp-matrix.yml index 1d2a3bbb56..edf88d2e68 100644 --- a/.github/workflows/agp-matrix.yml +++ b/.github/workflows/agp-matrix.yml @@ -73,6 +73,11 @@ jobs: disk-size: 4096M script: echo "Generated AVD snapshot for caching." + # API 37 ships as a minor-versioned platform (android-37.0); install it + # explicitly so the build can resolve it. + - name: Install compileSdk platform + run: echo "y" | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-37.0" + # Clean, build and release a test apk - name: Make assembleUiTests run: make assembleUiTests diff --git a/CHANGELOG.md b/CHANGELOG.md index 24df41730a..aed0cfec67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ Sentry.finishExtendedAppStart() ``` +- Full support for Android 17 (API level 37) ([#5723](https://github.com/getsentry/sentry-java/pull/5723)) + - The SDK is now compiled and targeted against `compileSdk`/`targetSdk` 37 and verified end-to-end on API 37: builds (incl. R8 full mode), Session Replay, crash & ANR reporting (JVM and native), and profiling + - Session Replay video encoding now handles the `@Nullable` `MediaCodecInfo.getVideoCapabilities()` introduced in the API 37 SDK - Add `trace_metric_byte` data category and record byte-level client reports when trace metrics are discarded ([#5626](https://github.com/getsentry/sentry-java/pull/5626)) - Support the `io.sentry.tombstone.report-historical` manifest option to enable historical tombstone reporting via `AndroidManifest.xml` `` ([#5683](https://github.com/getsentry/sentry-java/pull/5683)) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1a145040e7..1496545b10 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,8 +45,8 @@ springboot4 = "4.0.0" sqldelight = "2.3.2" # Android -targetSdk = "36" -compileSdk = "36" +targetSdk = "37" +compileSdk = "37" minSdk = "21" [plugins] diff --git a/sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt b/sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt index de14aadaaa..04d573d793 100644 --- a/sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt +++ b/sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt @@ -81,7 +81,7 @@ internal class SimpleVideoEncoder( val videoCapabilities = mediaCodec.codecInfo.getCapabilitiesForType(muxerConfig.mimeType).videoCapabilities - if (!videoCapabilities.bitrateRange.contains(bitRate)) { + if (videoCapabilities != null && !videoCapabilities.bitrateRange.contains(bitRate)) { options.logger.log( DEBUG, "Encoder doesn't support the provided bitRate: $bitRate, the value will be clamped to the closest one",