Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android平台Google渠道aab包无法加载mmkv的so,报com.getkeepsafe.relinker.MissingLibraryException #97

Open
jimmy5zhang opened this issue Apr 20, 2022 · 4 comments

Comments

@jimmy5zhang
Copy link

1、报错堆栈
java.lang.ExceptionInInitializerError:
at com.xxx.aspectj.SpAspect$Holder.access$000 (SpAspect.java)
at com.xxx.aspectj.SpAspect.redirectEnable (SpAspect.java:90)
at com.xxx.aspectj.SpAspect.onContextGetSp (SpAspect.java:39)
at com.huawei.hms.aaid.utils.PushPreferences$CallStubCgetSharedPreferencesa47401526db6800508c1c59bfb8a057b.redirect (PushPreferences.java)
at com.xxx.library.mtajx.runtime.BaseMethodJoint.invoke (BaseMethodJoint.java:13)
at com.huawei.hms.aaid.utils.PushPreferences. (PushPreferences.java:4)
at com.huawei.hms.opendevice.i. (i.java:1)
at com.huawei.hms.opendevice.i.a (i.java:1)
at com.huawei.hms.aaid.init.AutoInitHelper.isAutoInitEnabled (AutoInitHelper.java:1)
at com.huawei.hms.aaid.init.AutoInitHelper.doAutoInit (AutoInitHelper.java:1)
at com.huawei.hms.aaid.InitProvider.onCreate (InitProvider.java:1)
at android.content.ContentProvider.attachInfo (ContentProvider.java:2476)
at android.content.ContentProvider.attachInfo (ContentProvider.java:2446)
at android.app.ActivityThread.installProvider (ActivityThread.java:7904)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:7394)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7148)
at android.app.ActivityThread.access$1800 (ActivityThread.java:284)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2266)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:233)
at android.os.Looper.loop (Looper.java:334)
at android.app.ActivityThread.main (ActivityThread.java:8333)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1065)
at com.android.internal.crash.avbgmp7fqnit63ydh57mxmxuaf (crash.java:1)
Caused by: com.getkeepsafe.relinker.MissingLibraryException:
at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary (ApkLibraryInstaller.java:128)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal (ReLinkerInstance.java:180)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary (ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:51)
at com.xxx.core.sharedpreferences.SPUtil$rootDir$2$root$1.loadLibrary (SPUtil.java:58)
at com.tencent.mmkv.MMKV.doInitialize (MMKV.java:116)
at com.tencent.mmkv.MMKV.initialize (MMKV.java:108)
at com.tencent.mmkv.MMKV.initialize (MMKV.java:97)
at com.xxx.core.sharedpreferences.SPUtil$rootDir$2.invoke (SPUtil.java:57)
at com.xxx.core.sharedpreferences.SPUtil$rootDir$2.invoke (SPUtil.java:29)
at kotlin.SynchronizedLazyImpl.getValue (SynchronizedLazyImpl.java:74)
at com.xxx.core.sharedpreferences.SPUtil.getRootDir (SPUtil.java:8)
at com.xxx.core.sharedpreferences.SPUtil.getSharedPreferences (SPUtil.java:173)
at com.xxx.core.sharedpreferences.SPUtil.getSharedPreferences$default (SPUtil.java:171)
at com.xxx.core.sharedpreferences.SPUtil.readValue$default (SPUtil.java:277)
at com.xxx.core.sharedpreferences.SPUtil.readValue (SPUtil.java:13)
at com.xxx.pushagent.helper.OnOffSwitchHelper.readLastSwitchIfNeed (OnOffSwitchHelper.java:132)
at com.xxx.pushagent.helper.OnOffSwitchHelper.getOnOffSwitch (OnOffSwitchHelper.java:953)
at com.xxx.pushagent.helper.OnOffSwitchHelper.isSpReplaceEnable (OnOffSwitchHelper.java:911)
at com.xxx.aspectj.SpAspect$Holder. (SpAspect.java:94)
at com.xxx.aspectj.SpAspect$Holder.access$000 (SpAspect.java)
at com.xxx.aspectj.SpAspect.redirectEnable (SpAspect.java:90)
at com.xxx.aspectj.SpAspect.onContextGetSp (SpAspect.java:39)
at com.huawei.hms.aaid.utils.PushPreferences$CallStubCgetSharedPreferencesa47401526db6800508c1c59bfb8a057b.redirect (PushPreferences.java)
at com.xxx.library.mtajx.runtime.BaseMethodJoint.invoke (BaseMethodJoint.java:13)
at com.huawei.hms.aaid.utils.PushPreferences. (PushPreferences.java:4)
at com.huawei.hms.opendevice.i. (i.java:1)
at com.huawei.hms.opendevice.i.a (i.java:1)
at com.huawei.hms.aaid.init.AutoInitHelper.isAutoInitEnabled (AutoInitHelper.java:1)
at com.huawei.hms.aaid.init.AutoInitHelper.doAutoInit (AutoInitHelper.java:1)
at com.huawei.hms.aaid.InitProvider.onCreate (InitProvider.java:1)
at android.content.ContentProvider.attachInfo (ContentProvider.java:2476)
at android.content.ContentProvider.attachInfo (ContentProvider.java:2446)
at android.app.ActivityThread.installProvider (ActivityThread.java:7904)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:7394)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7148)
at android.app.ActivityThread.access$1800 (ActivityThread.java:284)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2266)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:233)
at android.os.Looper.loop (Looper.java:334)
at android.app.ActivityThread.main (ActivityThread.java:8333)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:582)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1065)
at com.android.internal.crash.avbgmp7fqnit63ydh57mxmxuaf (crash.java:1)

2、mmkv版本:com.tencent:mmkv-static:1.2.8
3、relinker版本:com.getkeepsafe.relinker:relinker:1.3.1

4、cpu架构: "armeabi-v7a", "arm64-v8a"

集中发生在11、12以及8系统,vivo手机居多,请问遇到这种问题如何解决呢?

@knyou
Copy link

knyou commented Jul 5, 2022

同样遇到这个问题,请问你解决了吗?

@iamskullking
Copy link

同样遇到这个问题,请问你解决了吗?

请问您解决了吗

@ld2006203
Copy link

Who needs ReLinker?
If your app includes native libraries, and your minimum SDK is below API 23 (Marshmallow), you need ReLinker.

There are a number of different bugs addressed by ReLinker; the last of these was resolved as of Marshmallow. As long as your app's min SDK is at or above it, loading libraries via System.loadLibrary("foo") is safe.

看简介中这段话,是不是判断一下当前手机版本,23及以上的就不用relinker了?

@est7
Copy link

est7 commented Feb 3, 2023

Who needs ReLinker? If your app includes native libraries, and your minimum SDK is below API 23 (Marshmallow), you need ReLinker.

There are a number of different bugs addressed by ReLinker; the last of these was resolved as of Marshmallow. As long as your app's min SDK is at or above it, loading libraries via System.loadLibrary("foo") is safe.

看简介中这段话,是不是判断一下当前手机版本,23及以上的就不用relinker了?

不是只有23才有问题,是兼容到23,在往下了不管了吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants