Trying to run the `todoapp` inside `compose-jb` an...
# compose
a
Trying to run the
todoapp
inside
compose-jb
and getting the following error:
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/alexander/.gradle/caches/transforms-3/137251a10d2c5151ea1d3a5bd29928e0/transformed/jetified-material-1.1.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties.
How do if fix this? I’ve tried
clean
->
build
and “Invalidate cache and restart”
m
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.)
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
Thanks @Michael Paus. Your fix worked for me!
c
@Alexander Suraphel be sure to file a bug on the jb compose repo
👌 1
a
@Colton Idle Done .
👍 1