Giter Club home page Giter Club logo

Comments (20)

calvarez-ov avatar calvarez-ov commented on May 22, 2024 83

Google is a good tool. Use it before asking questions.

I googled this and Google brought me here, to this snarky comment

from mmkv.

lingol avatar lingol commented on May 22, 2024 80

Google is a good tool. Use it before asking questions.

As for this issue, the very first hit by Google has an answer.

If you have a library that's adding some android .so files –like libassmidi.so or libgnustl_shared.so– you have to tell gradle to pick just one when packaging, otherwise you'll get the conflict.

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

from mmkv.

lingol avatar lingol commented on May 22, 2024 11

Google is a good tool. Use it before asking questions.

I googled this and Google brought me here, to this snarky comment

Wow, that's the joke of the week in such a hard time due to the virus.

from mmkv.

mail2chromium avatar mail2chromium commented on May 22, 2024 10

Google is a good tool. Use it before asking questions.

As for this issue, the very first hit by Google has an answer.

If you have a library that's adding some android .so files –like libassmidi.so or libgnustl_shared.so– you have to tell gradle to pick just one when packaging, otherwise you'll get the conflict.

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

Not fixed for me.

from mmkv.

egzon-mustafa avatar egzon-mustafa commented on May 22, 2024 10

This works for me.

android { packagingOptions { pickFirst '**/*.so' } }

from mmkv.

AhmedAbuelenin avatar AhmedAbuelenin commented on May 22, 2024 8

Google is a good tool. Use it before asking questions.

As for this issue, the very first hit by Google has an answer.

If you have a library that's adding some android .so files –like libassmidi.so or libgnustl_shared.so– you have to tell gradle to pick just one when packaging, otherwise you'll get the conflict.

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

I added this first but didn't work but when i tried like that it worked successfully, thanks to lingol for the hint.
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'
}
}

from mmkv.

Amina-UC-Dev avatar Amina-UC-Dev commented on May 22, 2024 5

This works for me.

android { packagingOptions { pickFirst '**/*.so' } }

yeah... its worked for me... thank u so much bro

from mmkv.

skydragon1115 avatar skydragon1115 commented on May 22, 2024 2
android {
    packagingOptions {
        pickFirst '**/*.so'
    }
}

This works for me. Thanks.

from mmkv.

lingol avatar lingol commented on May 22, 2024 1

Google is a good tool. Use it before asking questions.
As for this issue, the very first hit by Google has an answer.

If you have a library that's adding some android .so files –like libassmidi.so or libgnustl_shared.so– you have to tell gradle to pick just one when packaging, otherwise you'll get the conflict.

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

Not fixed for me.

Use static-linked instead https://github.com/Tencent/MMKV/wiki/android_setup#installation

from mmkv.

lingol avatar lingol commented on May 22, 2024

Now you get another choice, MMKV has a static-link version. Checkout our release note. (https://github.com/Tencent/MMKV/releases).

from mmkv.

ollyde avatar ollyde commented on May 22, 2024

@lingol after upgrading to AndroidX this solution doesn't seem to work anymore.

from mmkv.

lingol avatar lingol commented on May 22, 2024

@lingol after upgrading to AndroidX this solution doesn't seem to work anymore.

Try static link. com.tencent.mmkv-static:1.0.22

from mmkv.

lingol avatar lingol commented on May 22, 2024

Google is a good tool. Use it before asking questions.
As for this issue, the very first hit by Google has an answer.

If you have a library that's adding some android .so files –like libassmidi.so or libgnustl_shared.so– you have to tell gradle to pick just one when packaging, otherwise you'll get the conflict.

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

I added this first but didn't work but when i tried like that it worked successfully, thanks to lingol for the hint.
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'
}
}

For those who still face this problem, just use com.tencent:mmkv-static.

from mmkv.

lingol avatar lingol commented on May 22, 2024

FYI, starting from v1.2.11, MMKV will statically link libc++ by default. It will solve this problem once and for all.
For those who still prefer a shared link of libc++.so, use com.tencent:mmkv-shared instead.

from mmkv.

lingol avatar lingol commented on May 22, 2024

android {

    packagingOptions {

        pickFirst '**/*.so'

    }

}

This works for me. Thanks.

You should use mmkv-static instead. For different versions of libc++_shared.so will cause unexpected crashes.

from mmkv.

vaish8529 avatar vaish8529 commented on May 22, 2024

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/armeabi-v7a/libfbjni.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

In app/build.gradle file

   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 mmkv.

lingol avatar lingol commented on May 22, 2024

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/armeabi-v7a/libfbjni.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

In app/build.gradle file

   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"

}

You should just use upgrade to mmkv 1.2.11 and above.

from mmkv.

vaish8529 avatar vaish8529 commented on May 22, 2024

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/armeabi-v7a/libfbjni.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

In app/build.gradle file

   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"

}

You should just use upgrade to mmkv 1.2.11 and above.

how to update it?

from mmkv.

lingol avatar lingol commented on May 22, 2024

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/armeabi-v7a/libfbjni.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

In app/build.gradle file

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"

}

You should just use upgrade to mmkv 1.2.11 and above.

how to update it?

What? You have not imported MMKV? Why'd you ask question here?

from mmkv.

vaish8529 avatar vaish8529 commented on May 22, 2024

More than one file was found with OS independent path 'lib/armeabi-v7a/libfbjni.so'. If you are using jniLibs and CMake IMPORTED targets, see

coz I am having this error...

More than one file was found with OS independent path 'lib/armeabi-v7a/libfbjni.so'. If you are using jniLibs and CMake IMPORTED targets, see

from mmkv.

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.