【问题标题】:React-Native: ''Please remove usages of `jcenter()` Maven repository from your build scripts...''React-Native: ''请从你的构建脚本中删除 `jcenter()` Maven 存储库的使用...''
【发布时间】:2023-03-12 20:01:01
【问题描述】:

添加 react-native-image-crop-picker 后,我正在构建我的项目。但我遇到了这个错误。 你能告诉我解决这个问题的方法吗?非常感谢。

//build.gradle
buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "20.1.5948944"
    }
    repositories {
        
        mavenCentral()
        google()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.2.1")
    }
}

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        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")
        }

        google()
        maven { url 'https://maven.google.com' }
        maven { url 'https://www.jitpack.io' }
    }
}

【问题讨论】:

标签: android react-native maven build.gradle jcenter


【解决方案1】:

尝试从 jCenter 迁移到 mavenCentral

【讨论】:

    猜你喜欢
    • 2021-07-28
    • 1970-01-01
    • 2017-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多