Kureev / react-native-blur

React Native Blur component
MIT License
3.74k stars 555 forks source link

Build fails after installing @react-native-community/blur #496

Closed angelzbg closed 1 year ago

angelzbg commented 1 year ago

Hello, after installing the dependency my build now fails. npm install --save @react-native-community/blur build.gradle:

allprojects {
    repositories {
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        maven { url 'https://www.jitpack.io' }
    }
}

My error:

BUILD FAILED in 19s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.    
   > Could not resolve com.github.Dimezis:BlurView:version-2.0.2.
     Required by:
         project :app > project :react-native-community_blur
      > Could not resolve com.github.Dimezis:BlurView:version-2.0.2.
         > Could not get resource 'https://www.jitpack.io/com/github/Dimezis/BlurView/version-2.0.2/BlurView-version-2.0.2.pom'.
            > Could not GET 'https://www.jitpack.io/com/github/Dimezis/BlurView/version-2.0.2/BlurView-version-2.0.2.pom'.
               > Connect to www.jitpack.io:443 [www.jitpack.io/149.56.28.39] failed: Connection refused: connect

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 19s

    at makeError (D:\Workspace\native-app\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
    at D:\Workspace\native-app\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (D:\Workspace\native-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\Workspace\native-app\node_modules\@react-native-community\cli\build\index.js:192:9)
jhta commented 1 year ago

Same issue

TomWq commented 1 year ago

Same issue

SandroMachado commented 1 year ago

Jitpack is down, probably it's better to change to a Maven repository.

angelzbg commented 1 year ago

Problem solved. Jitpack was down.

bryanekong commented 1 year ago

Hello @angelzbg how did you solve this problem?

angelzbg commented 1 year ago

@bryanekong, check if jitpack is down. If it's down you can't download the files so all you can do is wait, find an alternative library or write it yourself.

bryanekong commented 1 year ago

How do I check this? This is my first-time running react-native, my app fails to build by throwing compilation error due to @react-native-community/blu

angelzbg commented 1 year ago

Does it say "Could not resolve com.github.Dimezis:BlurView:version-2.0.2."?

bryanekong commented 1 year ago

here's the error message error messa