compose-multiplatform: Failed to resolve: androidx.activity:activity-ktx:1.3.0-alpha01
Trying to build the imageViewer example but gradle sync shows this error:
> Could not find androidx.activity:activity-ktx:1.3.0-alpha01.
Required by:
project :android > org.jetbrains.compose.ui:ui-android-debug:0.3.0-build149
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 19 (6 by maintainers)
Commits related to this issue
- Include `test` directory into desktopTest source sets (#354) — committed to MatkovIvan/compose-multiplatform by eymar 2 years ago
Thanks @jimgoog , I will apply it to the TodoApp
Ok, sounds like imageviewer and todoapp have been fixed now.
@Shabinder Decompose is already updated, please checkout version 0.1.8.
Oops, I’ll leave this open until we merge an upgraded gradle configuration into the sample.
Managed to compile by copy-pasting the moved implementation of
setContent
:@CarsonRedeye,
I managed to build it with Kotlin
1.4.30
and JB Compose0.3.0-build152
, but some additional configuration was necessary.First, I needed to add a snapshot repository containing
activity-compose
artifacts:So that I could add
androidx.activity:activity-compose:1.3.0-SNAPSHOT
dependency.However,
activity-compose
uses other non-existing dependencies, which I couldn’t quickly find in theandroidx.dev
snapshots (there’s no easy search).In my case, this worked:
But I guess you might need to browse through the other snapshots to find the missing artifacts, depending on the specific case.
This workaround is probably necessary until
androidx.activity:activity-compose:1.3.0-alpha01
is released.Seems that
androidx.activity:activity-ktx:1.3.0-alpha01
is no longer required with0.3.0-build150
.Now, however,
ComponentActivity.setContent()
(from packageandroidx.compose.ui.platform
) no longer exists. According to deprecation message from0.3.0-build149
, it has been moved to theandroidx.activity:activity-compose
artifact (which also cannot be resolved). I assume this artifact has only been introduced in AndroidX Activity version1.3.0-alpha01
?