gpt4 book ai didi

gradle - 排毒构建错误 : More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

转载 作者:行者123 更新时间:2023-12-02 05:24:15 24 4
gpt4 key购买 nike

我正在尝试为 Android 的 ReactNative 项目构建 Detox 测试,但它抛出了此错误

> Task :react-native pdf:transformNativeLibsWithMergeJniLibsForDebugAndroidTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-pdf:transformNativeLibsWithMergeJniLibsForDebugAndroidTest'.
> More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

经过一些研究后,在 app/build.gradle 中添加这段代码应该会有所帮助

android {
packagingOptions {
pickFirst '/libjsc.so'
pickFirst '/libc++_shared.so'
}
}

然而,由于某种原因,gradlew assembleAndroidTest 没有使用打包选项来运行其构建,这会导致 More more file was found with OS dependent path 'lib/x86/libc++_shared.so 错误。

有人知道解决这个问题的方法吗?

最佳答案

More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

通常意味着...lib/x86/libc++_shared.so确实在项目中存在两次(或更频繁)。这可以例如。是,当从源代码构建并且在 jniLibs 中也有文件时目录。

关于gradle - 排毒构建错误 : More than one file was found with OS independent path 'lib/x86/libc++_shared.so' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56053358/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com