question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.VerifyError: com/facebook/i/k at SoLoader.initImpl$230dc011(SoLoader.java:203)

See original GitHub issue

Description

I posted the exact same issue to Fresco (https://github.com/facebook/fresco/issues/2039), but I believe that it’s actually for you.

Crash is happening on Android 4.x devices, when APK is built with ProGuard enabled and ‘proguard-android-optimize.txt’ configuration file.

Reproduction

  1. Get an Android 4.x device
  2. Build an app with following build settings (“-optimize” is the important part):
debug {
    minifyEnabled true
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-fresco.pro'
}
  1. BOOM!

You can find all the detailed information and system dumps here: http://crashes.to/s/c450feed2e9

Additional Information

  • Fresco version: 1.8.0
  • Platform version: Android 4.x.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
kcebcommented, Sep 24, 2019

@fenglu09 I noticed that the issue arose when I enabled multidex for a device with android sdk version 17 (Android 4.2). To resolve the issue, I followed steps here:

https://developer.android.com/studio/build/multidex#java

  1. Add implementation 'com.android.support:multidex:1.0.3' to dependencies in app/build.gradle
  2. In MainApplication.java:
import androidx.multidex.MultiDex; // Note: You might need to replace this with: import android.support.multidex.Multidex;
import android.content.Context;
  1. Add following to MainApplication.java:
  @Override
  protected void attachBaseContext(Context base) {
     super.attachBaseContext(base);
     MultiDex.install(this);
  }
1reaction
tuncaulubilgecommented, Apr 18, 2018

Adding these rules has resolved the issue for me

-keep,allowobfuscation @interface com.facebook.soloader.DoNotOptimize
-keep class com.facebook.soloader.SysUtil$LollipopSysdeps {
    public <methods>;
}
-keep @com.facebook.soloader.DoNotOptimize class *
-keepclassmembers class * {
    @com.facebook.soloader.DoNotOptimize *;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error while using react native component on Android ...
While trying to init the react native component in Android app getting this error on Android os version 4.4.2 and 4.2.2. Fatal Exception:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found