joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 767 forks source link

Repository https://jcenter.bintray.com does not work! #820

Open chukhlov opened 1 year ago

chukhlov commented 1 year ago

There is an android issue around RN-Fetch-Blob happened suddenly.

Screenshot 2022-10-30 at 17 49 22
FAILURE: Build failed with an exception.
> :rn-fetch-blob > Resolve dependencies of :rn-fetch-blob:classpath
* What went wrong:
A problem occurred configuring project ':rn-fetch-blob'.
> Could not resolve all artifacts for configuration ':rn-fetch-blob:classpath'.
   > Could not resolve com.android.tools.build:apksig:3.2.1.
     Required by:
         project :rn-fetch-blob > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1
         project :rn-fetch-blob > com.android.tools.build:gradle:3.2.1 > com.android.tools.build:builder:3.2.1 > com.android.tools.build:apkzlib:3.2.1
      > Could not resolve com.android.tools.build:apksig:3.2.1.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/apksig/3.2.1/apksig-3.2.1.pom'.
            > Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/apksig/3.2.1/apksig-3.2.1.pom'.
               > Read timed out
chukhlov commented 1 year ago

Android build works well by replacing repositories property in a file node_modules/rn-fetch-blob/android/build.gradle

It works on my side

repositories {
    mavenLocal()
    google()
//        jcenter()
    mavenCentral()
    maven { url "http://maven.google.com" }//Required for crashlytics
    maven { url "https://jitpack.io" }
}
juanevillam commented 1 year ago

Hi! This is also happening to me... Any solutions? It started to happen suddenly too. Thanks! image

mripqi commented 1 year ago

i tried the solution from areebshakeel https://github.com/joltup/rn-fetch-blob/issues/820

replace the jcenter() with mavenCentral() and add configurations

allprojects {
    repositories {
        ...
        mavenCentral()

        configurations.all {
            resolutionStrategy {

                // versions used by 0.67
                force 'com.squareup.okhttp3:okhttp:3.11.0'
                force 'com.facebook.yoga:proguard-annotations:1.19.0'
                force 'com.facebook.fbjni:fbjni-java-only:0.2.2'
                force 'com.facebook.flipper:flipper:0.99.0'
                force 'com.facebook.flipper:flipper-network-plugin:0.99.0'
                force 'com.facebook.flipper:flipper-fresco-plugin:0.99.0'
            }
        }

    }
}

i need to add this configuration because my project using 0.63 not 0.65+

ericksprengel commented 1 year ago

it's important to fix it in rn-fetch-blob and release another version because jcenter won't be available anymore.

I'll try to do it.

juanevillam commented 1 year ago

Just wanted to say that jcenter gradle repository looks like it's good now. Right now I generated a release and everything works correctly :)

I didn't change anything...

image

RonRadtke commented 1 year ago

Just switch to https://www.npmjs.com/package/react-native-blob-util Shouldn't be any issue there

caprincipal commented 2 days ago

I work this added maven { url "https://maven.google.com" } with letter "s" in https