Git Product home page Git Product logo

Comments (7)

jinanzhuan avatar jinanzhuan commented on August 24, 2024

The version is 1.3.1

from relinker.

benjamin-bader avatar benjamin-bader commented on August 24, 2024

Thanks for the bug report.

I'm puzzled at this stack trace - haven't ever seen or lines before. Line 155 the file in version 1.3.1 doesn't exactly correspond to anything in the trace. What do those or lines mean? Where do they come from?

Also, it would help to know what the actual exception message is, if you have it. As the issue stands now, there isn't enough information to say whether or not this is a ReLinker issue or a packaging issue. Usually it's the latter, but you never know!

Finally, I'll note that we're at version 1.4.4. We've fixed a few bugs since 1.3.1 - it's worth an upgrade.

from relinker.

thelou1s avatar thelou1s commented on August 24, 2024

Same problem:

image

log:

Non-fatal Exception: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'libmmkv.so'. Looked for: [armeabi-v7a, armeabi], but only found: [].
       at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java)
       at util.MmkvUtils.lambda$initialize$0(MmkvUtils.java)
       at util.-$$Lambda$MmkvUtils$sbLe1HJ9hfpxq8bb2XEO8Byn1ew.loadLibrary(-.java)
       at com.tencent.mmkv.MMKV.doInitialize(MMKV.java)
       at com.tencent.mmkv.MMKV.initialize(MMKV.java)
       at util.MmkvUtils.initialize(MmkvUtils.java)

java:

public class MmkvUtils {

    private static final String TAG = "MmkvUtils";

    private static volatile MMKV sMultiProcessMmkv;
    //private static volatile MMKV sDefaultMmkv;

    private MmkvUtils() {
    }

    public static void initialize(Context context) {
        String pathDir = context.getFilesDir().getAbsolutePath() + "/mmkv";
        String rootDir = MMKV.initialize(pathDir, libName -> {
            ReLinker.loadLibrary(context, libName);
        });
        Log.d(TAG, "initialize: " + rootDir);
    }

    public static MMKV multiProcessMmkv() {
        if (sMultiProcessMmkv == null) {
            synchronized (MmkvUtils.class) {
                if (sMultiProcessMmkv == null) {
                    ensureInitialized();
                    sMultiProcessMmkv = MMKV.mmkvWithID("MultiProcessMmkv", MMKV.MULTI_PROCESS_MODE);
                }
            }
        }
        return sMultiProcessMmkv;
    }

    private static void ensureInitialized() {
        if (TextUtils.isEmpty(MMKV.getRootDir())) {
            MMKV.initialize(AppUtils.getApp());
        }
    }

from relinker.

sanyamjain-plivo avatar sanyamjain-plivo commented on August 24, 2024

@thelou1s I am facing the same issue, Did you find the solution?

from relinker.

evgenybozhko2 avatar evgenybozhko2 commented on August 24, 2024

@thelou1s @benjamin-bader @jinanzhuan @sanyamjain-plivo @cahlbin Any news for this issue?

from relinker.

mistletoe5215 avatar mistletoe5215 commented on August 24, 2024

me2,any solutions?

from relinker.

Keko2025 avatar Keko2025 commented on August 24, 2024

Try this initialization approach.
image

from relinker.

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.