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

Fatal Exception: java.lang.ExceptionInInitializerError #735

Closed
alexandre-thauvin opened this issue Apr 25, 2020 · 11 comments
Closed

Fatal Exception: java.lang.ExceptionInInitializerError #735

alexandre-thauvin opened this issue Apr 25, 2020 · 11 comments

Comments

@alexandre-thauvin
Copy link

alexandre-thauvin commented Apr 25, 2020

Hello ! Thanks for this nice lib !
I have this error on a Nexus 5X Android 8.0.0
I'm using Bundle App (.aab) to deploy on play store. Is it related to this issue
impl:
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.17'

Caused by com.getkeepsafe.relinker.MissingLibraryException
libpl_droidsonroids_gif.so
com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary (ApkLibraryInstaller.java:128)
com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal (ReLinkerInstance.java:180)
com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary (ReLinkerInstance.java:136)
com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:70)
com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:51)
pl.droidsonroids.gif.LibraryLoader.loadLibrary (LibraryLoader.java:52)
pl.droidsonroids.gif.GifInfoHandle.<clinit> (GifInfoHandle.java:27)
pl.droidsonroids.gif.GifDrawable.<init> (GifDrawable.java:159)
pl.droidsonroids.gif.GifDrawable.<init> (GifDrawable.java:94)
pl.droidsonroids.gif.GifViewUtils.setResource (GifViewUtils.java:55)
pl.droidsonroids.gif.GifImageView.setImageResource (GifImageView.java:101)
com.weedmanager.myweedmanager.SplashActivity.onCreate (SplashActivity.kt:52)
Caused by com.getkeepsafe.relinker.MissingLibraryException
com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary (ApkLibraryInstaller.java:128)
com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal (ReLinkerInstance.java:180)
com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary (ReLinkerInstance.java:136)
com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:70)
com.getkeepsafe.relinker.ReLinker.loadLibrary (ReLinker.java:51)
pl.droidsonroids.gif.LibraryLoader.loadLibrary (LibraryLoader.java:52)
pl.droidsonroids.gif.GifInfoHandle.<clinit> (GifInfoHandle.java:27)
pl.droidsonroids.gif.GifDrawable.<init> (GifDrawable.java:159)
pl.droidsonroids.gif.GifDrawable.<init> (GifDrawable.java:94)
pl.droidsonroids.gif.GifViewUtils.setResource (GifViewUtils.java:55)
pl.droidsonroids.gif.GifImageView.setImageResource (GifImageView.java:101)
com.weedmanager.myweedmanager.SplashActivity.onCreate (SplashActivity.kt:52)
android.app.Activity.performCreate (Activity.java:6975)

EDIT:
There is the simple implementation:

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_splash)
        //stuff
        ivLogo.setImageResource(R.drawable.bandera_gif)
}

ivLogo:

<pl.droidsonroids.gif.GifImageView
            android:paddingEnd="100dp"
            android:paddingStart="100dp"
            android:id="@+id/ivLogo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

The GifImageView is the only view I have in my whole layout.

How I build my AABs:
Build -> Generate Signed APK/AAB -> AAB -> Next (choosing keystone screen) -> release -> Finish

If you need any more information do not hesitate to tell me!

@koral--
Copy link
Owner

koral-- commented Apr 26, 2020

Could you share a minimal project which reproduces this issue along with the info how are you building AABs?

@alexandre-thauvin
Copy link
Author

Hi koral !
Thanks for your time !
I just edited my original message :)

@guness
Copy link

guness commented May 27, 2020

Hello @koral-- , @alexandre-thauvin ;

I am facing similar error on another library. could you check if this is related: KeepSafe/ReLinker#47

@koral-- koral-- removed the needs info label Jul 3, 2020
@koral--
Copy link
Owner

koral-- commented Jul 3, 2020

Thanks @guness for the info. Sorry @alexandre-thauvin for my slowness.
Message in linked exception is a little bit different. But ReLinker has been updated in the meantime I'll integrate those changes.

koral-- added a commit that referenced this issue Sep 6, 2020
Potential fix for #730, #735
koral-- added a commit that referenced this issue Oct 4, 2020
* Dependency versions bump
* Update ReLinker
Potential fix for #730, #735
* Integrate upstream giflib changes
Fixes #743
* Fix engine in GifWallpaperService
@Riaxter
Copy link

Riaxter commented Nov 29, 2020

Hi @koral--. I think I'm having same issue here 😢
Could you let me know when it will be fixed?

@koral--
Copy link
Owner

koral-- commented Nov 29, 2020

@Riaxter which library version are you using?

@Riaxter
Copy link

Riaxter commented Dec 3, 2020

@koral-- oh, sorry for late reply, I'm using 1.2.19 version

implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'

@Riaxter
Copy link

Riaxter commented Dec 4, 2020

@koral-- There is new update for this issue:

  1. No crash occurred with aab file on Google Play store.
  2. But still crashing with building in local with: Android studio -> Run tab -> Edit configurations... -> Deploy -> Change to APK from app bundle

@koral--
Copy link
Owner

koral-- commented Dec 4, 2020

Good catch @Riaxter !
Will try to investigate using that scenario.

@ZhangHui1024
Copy link

is resolved now? I have the same issue here now.

@koral--
Copy link
Owner

koral-- commented Jul 26, 2022

Sorry for the lack of answer, but I could not reproduce an issue where the same app on the same device is working when installed from play store but not locally from apk.

Regarding the MissingLibrary exception itself, look also here: https://github.com/koral--/android-gif-drawable/issues/778#issuecomment-1179306620

@koral-- koral-- closed this as completed Aug 10, 2022
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