cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.25k stars 213 forks source link

Build failure Could not find com.android.tools.build:gradle:8.1.1. #1294

Closed Vivekban closed 6 months ago

Vivekban commented 6 months ago

Description When adding stable Paparazzi dependency, my build failed

Could not resolve all files for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:8.1.1.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/com/android/tools/build/gradle/8.1.1/gradle-8.1.1.pom
     Required by:
         project : > app.cash.paparazzi:app.cash.paparazzi.gradle.plugin:1.3.2 > app.cash.paparazzi:paparazzi-gradle-plugin:1.3.2
   > Could not find com.android.tools:sdk-common:31.1.2.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/com/android/tools/sdk-common/31.1.2/sdk-common-31.1.2.pom
     Required by:
         project : > app.cash.paparazzi:app.cash.paparazzi.gradle.plugin:1.3.2 > app.cash.paparazzi:paparazzi-gradle-plugin:1.3.2`

Steps to Reproduce Provide a sample project, failing test, or steps to reproduce.

Expected behavior A clear and concise description of what you expected to happen.

Additional information:

Screenshots If applicable, add screenshots to help explain your problem.

jrodbx commented 6 months ago

This error is saying that your project is unable to find android tools-specific dependencies, which has nothing to do with Paparazzi.

Given the subsection under "Searched in the following locations", my guess is that your buildscript classpath is missing the google() repository, which hosts those dependencies. For more, see https://github.com/cashapp/paparazzi?tab=readme-ov-file#releases.