Task :app:transformNativeLibsWithMergeJniLibsForDebug FAILED

后端 未结 7 889
悲&欢浪女
悲&欢浪女 2020-12-31 00:08

I am working with react native and every time I build a new project it seems to work on my device , but whenever I try to restart it It is giving me 1 or more errors

<
7条回答
  •  天命终不由人
    2020-12-31 00:26

    go to android/app/build.gradle add the following under android

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

    Running the cleaning task solved the problem for me. In your project's android dir, run gradle wrapper with 'clean'

    cd android && ./gradlew clean

    Then you can go back to project dir and try running again.

    cd .. && react-native run-android

提交回复
热议问题