首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >./gradlew assembleRelease构建失败,无法找到com.linkedin.dexmaker:右转:2.21.0

./gradlew assembleRelease构建失败,无法找到com.linkedin.dexmaker:右转:2.21.0
EN

Stack Overflow用户
提问于 2022-01-25 15:27:50
回答 2查看 961关注 0票数 3

这是一个反应本地项目与博览会裸露的工作流程。

./gradlew assembleDebug正常工作,我可以运行这个应用程序。

但是,./gradlew assembleRelease生成失败,输出如下:

代码语言:javascript
复制
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

expo-json-utils不在package.json依赖项中列出,因此它必须是其中一个包的子依赖项。

jcenter()添加到android/build.gradle并不能解决这个问题。

有什么想法,哪些包可以使用expo-json-utils或如何消除这一问题?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-01-26 07:38:45

有两个问题。

最近,android/app/build.gradle更新了

  1. 博览会和相关包装,这些产品还在
  2. 中。

代码语言:javascript
复制
apply from: "../../node_modules/expo-constants/scripts/get-app-config-android.gradle"
apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"

他们应该被移除。

  1. 仍然需要将jcenter()添加到android/build.gradle文件的部分:

代码语言:javascript
复制
allprojects {
    repositories {

看起来只有最新版本的2.28.1被添加到maven central:https://mvnrepository.com/artifact/com.linkedin.dexmaker/dexmaker-mockito

较早的版本在jcenter中,来自expo-json-utils@0.2.0的传递依赖版本是2.21.0

票数 0
EN

Stack Overflow用户

发布于 2022-06-20 21:06:53

jcenter()添加到settings.gradle解决了这个问题:

代码语言:javascript
复制
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        jcenter() // <- this
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70851323

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档