Giter Site home page Giter Site logo

Comments (4)

JWiseCoder avatar JWiseCoder commented on June 14, 2024 1

We're also receiving an error like this when building for Android in NativeScript 8.5

Execution failed for task ':app:mergeDebugNativeLibs'.
2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
 - {home directory}/.gradle/caches/transforms-3/5f9aea1bacbd967e47cda037c65bd0e3/transformed/jetified-PdfiumAndroid-1.0.1/jni/arm64-v8a/libc++_shared.so
 - {home directory}/.gradle/caches/transforms-3/cd760d28106a1b4d4e96396bcec235da/transformed/jetified-nativescript-optimized-with-inspector/jni/arm64-v8a/libc++_shared.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets

Command ./gradlew failed with exit code 1

There is a workaround: add this at the end of the android block of your app.gradle file:

EDIT: Use the packagingOptions from the following post by @alexander-mai

This works, but it's only a workaround. This issue still needs to be addressed inside NativeScript.

EDIT: This appears to be caused by the @nativescript/pdf dependency.

from android.

alexander-mai avatar alexander-mai commented on June 14, 2024

Different versions of the libc++ library are used in @nativescript/android and the PDF library used in @nativescript/pdf. This leads to the mentioned conflict. The used library 'TalbotGooday:AndroidPdfViewer' would have to be updated so that the same libc++ is used. It was last updated 3 years ago, but there are updated forks.

My workaround is

    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'
    }

from android.

JWiseCoder avatar JWiseCoder commented on June 14, 2024

@alexander-mai Thanks, I actually switched to doing that after posting the above. I should have gone back and updated my post.

If there are updated forks, then that's what @nativescript/pdf should use, right? I entered this same issue over there too. I'd rather not have to leave this in the app.gradle.

from android.

alexander-mai avatar alexander-mai commented on June 14, 2024

There is already a an open issue for @nativescript/pdf on plugin repository: NativeScript/plugins#503 facing this problem.

from android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.