-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resources$NotFoundException
on tests with AlertDialog
on latest compileSdk version
#1025
Comments
Resources$NotFoundException
on tests with AlertDialog
on latest material3 compose alphaResources$NotFoundException
on tests with AlertDialog
on latest compileSdk version
We have this as a workaround:
That allows us to use compile and target sdk 34 while keeping Paparazzi on 33 until it supports the newer platform version. I assume it needs a layoutlib update |
Note the above solution can require more work if your CI uses ephemeral nodes. You will need to ensure that SDK 33 is also actually installed |
Can confirm. I couldn't use sdkmanager ( Details// dummy empty module with only build.gradle.kts (ex project/libs/compileSdk33-require/build.gradle.kts)
plugins {
alias(libs.plugins.android.library)
}
android {
namespace = "common.compilesdk33_require"
compileSdk = 33
defaultConfig {
minSdk = 24
}
}
// settings.gradle
include (":libs:compileSdk33-require") Then just add |
It looks like AS Hedgehog handles previews properly, whilst Giraffe Patch 1 is failing to render previews for such composables. I guess this would stick for a while until the next patch for Giraffe with SDK 34 support or Hedgehog is released. |
Wait giraffe breaks compose previews on sdk 34? |
Seems so, tested the same composable on Giraffe Patch 1 and Hedgehog Canary 16, and Giraffe renders 1x1px previews with compile SDK 34. Upd: it renders regular composables, just fails on dialog and popups |
I had the same issue, and got it working with the workaround of setting environment to 33. Tried with 1.3.2-SNAPSHOT. Also, Hedgehog indeed breaks previews in AndroidStudio of my AlertDialogs. |
Snapshot 1.3.2-SNAPSHOT doesn't work for us. |
The bug is strictly dependent on the layoutlib. Paparazzi only updates to the most recent stable layoutlib. Until a stable build of layoutlib from AS Hedgehog that properly supports SDK 34 is released, I doubt something can be done without working around layoutlib internals. It looks like 🦔 has reached RC2 so the first release might be soon-ish 🤞. |
Somehow it works now for me again. I use Buildtools version 34.0.0, and compileSdk 34. With latest Android SDK updates from check for updates dialog in Android studio. (Paparazzi 1.3.3) However, I do have targetted Android 33. But that failed for me as well for Dialogs before. So FYI, |
Closed by #1314 |
Description
Our tests with
AlertDialog
compose components are failing with stacktraces like this after settings bothcompileSdk
andtargetSdk
to34
.Steps to Reproduce
Record screenshots of composables with
AlertDialogs
when usingcompileSdk
andtargetSdk
set to 34.Expected behavior
The screenshots should be recorded.
Additional information:
The text was updated successfully, but these errors were encountered: