-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Failed to resolve: androidx.activity:activity-ktx:1.3.0-alpha01 #354
Comments
Yeah, sorry about that - it's a known issue we discovered a couple of days ago. @olonho @igordmn This was fixed in master (https://android-review.googlesource.com/c/platform/frameworks/support/+/1576432) so I think if we can push out another build rebased on master, this should go away. Or alternatively, I think this missing artifact is intended to be published on Wednesday, which should hopefully also resolve this issue. So a couple of fixes are already in flight, and it's a race to see which fix gets published first. Sorry for the inconvenience. It sucks when examples don't build :(. |
@Chozzle As a temporary workaround, I think downgrading from |
@Chozzle Or it looks like |
No problem I can wait for the fix. It's just for my library compose-macos-theme. It appears that the problem persists with build 150 though |
Seems that Now, however, |
That make sense. I wasn't able to build the Android app in my example due to this |
I managed to build it with Kotlin First, I needed to add a snapshot repository containing allprojects {
repositories {
// AndroidX snapshots (https://androidx.dev/):
maven { url = uri("https://androidx.dev/snapshots/builds/7134056/artifacts/repository/") }
}
} So that I could add However, In my case, this worked: val androidMain by getting {
dependencies {
api("androidx.activity:activity-compose:1.3.0-SNAPSHOT") {
isTransitive = false
}
}
} 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 |
Looks like
|
Managed to compile by copy-pasting the moved implementation of fun ComponentActivity.setContent(
parent: CompositionContext? = null,
content: @Composable () -> Unit
) {
val existingComposeView = window.decorView
.findViewById<ViewGroup>(android.R.id.content)
.getChildAt(0) as? ComposeView
if (existingComposeView != null) with(existingComposeView) {
setParentCompositionContext(parent)
setContent(content)
} else ComposeView(this).apply {
// Set content and parent **before** setContentView
// to have ComposeView create the composition on attach
setParentCompositionContext(parent)
setContent(content)
setContentView(this, DefaultLayoutParams)
}
}
private val DefaultLayoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
) |
Looks like @Deprecated("Renamed to CompositionContext")
typealias CompositionReference = CompositionContext Since I think the |
Ok, finally published. You should now be able to use Please make sure you add an explicit dependency on androidx.activity:activity-compose:1.3.0-alpha02 when upgrading to this Compose version https://developer.android.com/jetpack/androidx/releases/activity#1.3.0-alpha02 |
Oops, I'll leave this open until we merge an upgraded gradle configuration into the sample. |
@jimgoog Looks like errors are still same: "Duplicate class ..." |
One step at a time. First step is to get imageviewer building which is done in #374 |
Thanks @jimgoog , I will apply it to the TodoApp |
Waiting for it...., decompose was throwing earlier an error:with Kotlin 1.4.30: Class 'com.arkivanov.decompose.extensions.compose.jetbrains.RouterStateComposableKt' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler. decompose gonna get updated too? |
@Shabinder Decompose is already updated, please checkout version 0.1.8. |
Ok, sounds like imageviewer and todoapp have been fixed now. |
Trying to build the imageViewer example but gradle sync shows this error:
The text was updated successfully, but these errors were encountered: