It’s funny that I had the exact same (and a lot of other) problem(s) with the same example just moments ago. This is what I did to fix it (from my notes):
Copy code
In android/build.gradle.kts set
compileSdkVersion(31)
targetSdkVersion(30)
to avoid
The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.compose.material:material:1.1.0-beta01.
AAR metadata file: /Users/mpaus/.gradle/caches/transforms-3/b4ec6f3b44de3015d7560f9b6ba22fac/transformed/jetified-material-1.1.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties.
Don't set targetSdkVersion to 31 because that leads to other problems (which should actually be fixed of course too.)
Michael Paus
11/28/2021, 2:25 PM
I spent half of the day on this todo example to get all configurations updated so that most of it compiled and ran. I failed on the web version though. Is it really so difficult to keep the build settings up-to-date?
🙏 1
a
Alexander Suraphel
11/28/2021, 3:03 PM
Thanks @Michael Paus. Your fix worked for me!
c
Colton Idle
11/28/2021, 6:10 PM
@Alexander Suraphel be sure to file a bug on the jb compose repo