With compose 1.0.0-rc01, i'm getting an error "Fai...
# compose
c
With compose 1.0.0-rc01, i'm getting an error "Failed to resolve: ui-graphics-1.0.0-rc01". I haven't specified ui-graphics explicitly before today, and adding it didn't help
👀 1
Gradle sync error:
Copy code
Failed to resolve: ui-graphics-1.0.0-rc01
Affected Modules: app
First build error:
Copy code
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform ui-graphics-1.0.0-rc01.aar (androidx.compose.ui:ui-graphics:1.0.0-rc01) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find ui-graphics-1.0.0-rc01.aar (androidx.compose.ui:ui-graphics:1.0.0-rc01).
        Searched in the following locations:
            <https://dl.google.com/dl/android/maven2/androidx/compose/ui/ui-graphics/1.0.0-rc01/ui-graphics-1.0.0-rc01.aar>
y
I have the same issue trying to update to RC1. I get:
Copy code
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkNextDebugAarMetadata'.
> Could not resolve all files for configuration ':app:nextDebugRuntimeClasspath'.
   > Failed to transform ui-util-1.0.0-rc01.aar (androidx.compose.ui:ui-util:1.0.0-rc01) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find ui-util-1.0.0-rc01.aar (androidx.compose.ui:ui-util:1.0.0-rc01).
        Searched in the following locations:
            <https://dl.google.com/dl/android/maven2/androidx/compose/ui/ui-util/1.0.0-rc01/ui-util-1.0.0-rc01.aar>
   > Failed to transform profileinstaller-1.0.0-rc01.aar (androidx.profileinstaller:profileinstaller:1.0.0-rc01) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find profileinstaller-1.0.0-rc01.aar (androidx.profileinstaller:profileinstaller:1.0.0-rc01).
        Searched in the following locations:
            <https://dl.google.com/dl/android/maven2/androidx/profileinstaller/profileinstaller/1.0.0-rc01/profileinstaller-1.0.0-rc01.aar>
The weird thing is that the links do actually work but Gradle cant fetch the aar files for some reason.
a
hmm, @Nick Anthony
c
Yeah. I've deleted my .gradle/cache directory, and invalidated/restarted Android Studio. didn't help. the gradle sync error goes away if I comment out all of my androidx.compose implementations, but adding any one of them back causes the error again
a
hmm, might be some cdn stuff rolling out? Looks like it's here: https://maven.google.com/web/index.html#androidx.compose.ui:ui-graphics
c
yeah, I can click the link from my build output and download
ui-graphics-1.0.0-rc01.aar
just fine
To remove any issues my specific project might be causing, I created a new project, using the Empty Compose Activity template in Android Studio. it defaults to compose beta07, and gradle sync works with that for the default project. Once I change it to
compose_version = '1.0.0-rc01'
then I start getting the same error with ui-graphics.
🙌 1
n
What version of Android Studio are you using?
y
@Nick Anthony I am using the Arctic Fox Beta 4
c
2020.3.1 Beta 4
y
I can try with Canary as well
Same issue on Bumblebee Canary 2
Although for some reason my build fails with a green checkmark on Arctic fox lol
a
i have 2020.3.1 Beta 4 and it works fine
n
Thanks for the details! Checking each piece of the pipeline to see if anything odd stands out
👍 2
At this point, I suspect this is a red herring error - I can't repro on my machine. The other thing I would check is that you're using kotlin
1.5.10
And if nothing fixes it, please file an issue with details at https://issuetracker.google.com/issues/new?component=610764&amp;template=1424126
c
Ok, I appreciate you checking. I am on kotin 1.5.10. I'll see if I can resolve it on my end and file an issue otherwise.
👍 1
y
I am trying to fix it as well but am not sure what else to try really. I am on a fresh windows install and built my app with compose beta09 today without any problems so I am sure the beta09 files were not just cached.
c
i seemed to have fixed it by closing android studio, killing an android studio java process that was hung, deleting my
.gradle/cache
directory, starting android studio, and invalidating cache/restart
as the adage goes... have you tried turning it off and on again (and then deleting caches)
y
I tried invalidating cache a few times but not deleting files manually or rebooting the PC. Ill try now. Since the links work fine, it should be a cache problem or something in Android Studio. Thanks, I will try it now.
c
I have the same problem but with ui-tooling and ui-tooling-preview and ui-test-junit4
p
has anybody found a reliable workaround? I've deleted
.gradle/caches
and killed gradle processes
c
I'm still struggling with this. I created a empty compose activity project with the project wizard (arctic fox b4) and upgraded the compose version to rc1 and it worked
but with my current project, it doesn't even seem to check the google repos
Copy code
Cause 3: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find androidx.compose.ui:ui-tooling-preview:1.0.0-rc1.
Searched in the following locations:
  - <https://oss.sonatype.org/content/repositories/snapshots/androidx/compose/ui/ui-tooling-preview/1.0.0-rc1/ui-tooling-preview-1.0.0-rc1.pom>
  - <https://jitpack.io/androidx/compose/ui/ui-tooling-preview/1.0.0-rc1/ui-tooling-preview-1.0.0-rc1.pom>
  - <https://repo.maven.apache.org/maven2/androidx/compose/ui/ui-tooling-preview/1.0.0-rc1/ui-tooling-preview-1.0.0-rc1.pom>
p
aren't you missing the google repo in that case?
c
I haven't changed anything in my gradle files setup, in
settings.gradle
Copy code
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        maven { url '<https://oss.sonatype.org/content/repositories/snapshots/>' }
        maven { url "<https://jitpack.io>" }
        mavenCentral()
    }
}
same as the wizard project
p
I don't think the template adds that to
settings.gradle
c
🙂 not exactly that, those I my repos Template adds
Copy code
google()
mavenCentral() 
jcenter() // Warning: this repository is going to shut down soon
p
you have to add repos for the buildscript and for each project. I'm pretty sure your problem is unrelated to the
ui-graphics
issue
c
oh it works fine with beta09 in a 20+ module project. now I tried updating to rc01 in my project checked out in a different directory, and that worked 🤔
p
probably because you had beta09 cached so there was no need to download new artifacts
c
no I removed the caches before