任务':app:mergeDebugNativeLibs'的执行失败在本地反应

问题描述

我在我的项目中安装了react-native-pdf,当我使用“ npx react-native run-android”运行时,失败并显示以下错误

* What went wrong:
Execution Failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

任何人都可以帮助我的人使用包react-native-pdf

ive

解决方法

我遇到了同样的问题,并通过将以下内容添加到android / app / build.gradle

来解决了该问题
android {

packagingOptions {
    pickFirst 'lib/x86/libc++_shared.so'
    pickFirst 'lib/x86_64/libc++_shared.so'
    pickFirst 'lib/armeabi-v7a/libc++_shared.so'
    pickFirst 'lib/arm64-v8a/libc++_shared.so'
}

/** rest of your code here **/

}

,

在Android Studio android中打开项目并清理项目 CUBIN: CUDA_ERROR_NO_BINARY_FOR_GPU: no kernel image is available for execution on the device

,

我在“android/app/build.gradle”中将 minSdkVersion 更改为 21。

defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.custom_epub_view"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...