这是一个反应本地项目与博览会裸露的工作流程。
./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.6expo-json-utils不在package.json依赖项中列出,因此它必须是其中一个包的子依赖项。
将jcenter()添加到android/build.gradle并不能解决这个问题。
有什么想法,哪些包可以使用expo-json-utils或如何消除这一问题?
发布于 2022-01-26 07:38:45
有两个问题。
最近,android/app/build.gradle更新了
apply from: "../../node_modules/expo-constants/scripts/get-app-config-android.gradle"
apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"他们应该被移除。
jcenter()添加到android/build.gradle文件的部分: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。
发布于 2022-06-20 21:06:53
将jcenter()添加到settings.gradle解决了这个问题:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
jcenter() // <- this
}
}https://stackoverflow.com/questions/70851323
复制相似问题