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

There are some exceptions on Android 9.0 when app started #35

Closed
liusgh opened this issue Mar 15, 2019 · 1 comment
Closed

There are some exceptions on Android 9.0 when app started #35

liusgh opened this issue Mar 15, 2019 · 1 comment

Comments

@liusgh
Copy link

liusgh commented Mar 15, 2019

Hello developers:
On Android 9.0 I found some exception information when app started, the stack is as follows:

03-15 16:18:13.307 26854-26854/com.xxx.xxx:dcs W/SoLoader: Cannot get nativeLoad method
    java.lang.NoSuchMethodException: nativeLoad [class java.lang.String, class java.lang.ClassLoader, class java.lang.String]
        at java.lang.Class.getMethod(Class.java:2068)
        at java.lang.Class.getDeclaredMethod(Class.java:2047)
        at com.facebook.soloader.SoLoader.getNativeLoadRuntimeMethod(SoLoader.java:281)
        at com.facebook.soloader.SoLoader.initSoLoader(SoLoader.java:233)
        at com.facebook.soloader.SoLoader.initImpl(SoLoader.java:141)
        at com.facebook.soloader.SoLoader.init(SoLoader.java:120)
        at com.facebook.soloader.SoLoader.init(SoLoader.java:104)
        at com.xxx.xxx.impl.webp.WebpResourceDecoder.<init>(WebpResourceDecoder.java:54)
        at com.xxx.xxx.base.xxx.registerComponents(xxx.java:77)
        at com.bumptech.glide.GeneratedAppGlideModuleImpl.registerComponents(GeneratedAppGlideModuleImpl.java:32)
        at com.bumptech.glide.Glide.initializeGlide(Glide.java:269)
        at com.bumptech.glide.Glide.initializeGlide(Glide.java:219)
        at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:180)
        at com.bumptech.glide.Glide.get(Glide.java:164)
        ...

You may be confused that some classes( For example, WebpResourceDecoder) are not in your project.
In fact, our project integrates your project and GlideWebpSupport (https://github.com/roths/GlideWebpSupport) in a sourcecode-dependent way. We replaced the WebpDecoder and WebpFrameLoader classes in your project with the same-named classes in the GlideWebpSupport project (because we found some problems with the GlideWebpSupport project).

My question is what would be the risk of this error if not handled, because we have not found any abnormality in the loading of dynamic webp.
Due to the lack of familiarity with fresco and c++ mechanisms, I would like to ask if it is necessary to deal with this error, because we only use fresco to load dynamic webp.

Many thanks.

@zjupure
Copy link
Owner

zjupure commented Mar 15, 2019

at com.facebook.soloader.SoLoader.init(SoLoader.java:104)
at com.xxx.xxx.impl.webp.WebpResourceDecoder.<init>(WebpResourceDecoder.java:54)

GlideWebpDecoder do not use WebpResourceDecoder and Soloader library, It seems like Soloader call an API that has been removed in Android P.
see facebook/SoLoader@4995a4b#diff-af2278b3b6db94229f8e96a1f3862dbd, comment: the third argument of nativeLoad method was removed in Android P API.

You should update the soloader library version to avoid the risk, thanks.

@zjupure zjupure closed this as completed Mar 15, 2019
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

2 participants