./gradlew assembleRelease 构建失败,找不到 com.linkedin.dexmaker:dexmaker:2.21.0

shi*_*t66 4 android release react-native expo

这是一个具有博览会裸工作流程的反应本机项目。
./gradlew assembleDebug工作正常,我可以运行该应用程序。

但是./gradlew assembleRelease构建失败并显示以下输出:

Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':expo-json-utils:debugAndroidTestRuntimeClasspath'.
   > Could not find com.linkedin.dexmaker:dexmaker:2.21.0.
     Searched in the following locations:
       - file:/Users/<MY USERNAME>/.m2/repository/com/linkedin/dexmaker/dexmaker/2.21.0/dexmaker-2.21.0.pom
       - file:/Users/<MY PROJECT PATH>/node_modules/react-native/android/com/linkedin/dexmaker/dexmaker/2.21.0/dexmaker-2.21.0.pom
       - file:/Users/<MY PROJECT PATH>/node_modules/jsc-android/dist/com/linkedin/dexmaker/dexmaker/2.21.0/dexmaker-2.21.0.pom
       - https://dl.google.com/dl/android/maven2/com/linkedin/dexmaker/dexmaker/2.21.0/dexmaker-2.21.0.pom
       - https://repo.maven.apache.org/maven2/com/linkedin/dexmaker/dexmaker/2.21.0/dexmaker-2.21.0.pom
       - https://www.jitpack.io/com/linkedin/dexmaker/dexmaker/2.21.0/dexmaker-2.21.0.pom
     Required by:
         project :expo-json-utils > io.mockk:mockk-android:1.10.6 > io.mockk:mockk-agent-android:1.10.6
Run Code Online (Sandbox Code Playgroud)

expo-json-utils未在package.json依赖项中列出,因此它必须是其中一个包的子依赖项。
添加jcenter()android/build.gradle不能解决问题。

有什么想法可以使用哪个包expo-json-utils或如何解决这个问题?

小智 5

添加jcenter()settings.gradle解决的问题:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        jcenter() // <- this
    }
}
Run Code Online (Sandbox Code Playgroud)