It crashes when I use these in gradle file just for displaying GIF.
compile 'com.facebook.fresco:fresco:1.8.1'
compile 'com.facebook.fresco:animated-gif:1.+'
This is what the debug printed.
E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.beostore, PID: 16824
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/common/soloader/SoLoaderShim$Handler;
at com.facebook.react.shell.MainReactPackage$9.get(MainReactPackage.java:173)
at com.facebook.react.shell.MainReactPackage$9.get(MainReactPackage.java:170)
at com.facebook.react.LazyReactPackage.createNativeModules(LazyReactPackage.java:81)
at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106)
at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1196)
at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1166)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1099)
at com.facebook.react.ReactInstanceManager.access$800(ReactInstanceManager.java:112)
at com.facebook.react.ReactInstanceManager$4.run(ReactInstanceManager.java:927)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.common.soloader.SoLoaderShim$Handler" on path: DexPathList[[zip file "/data/app/com.beostore-2/base.apk", zip file "/data/app/com.beostore-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.beostore-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.beostore-2/lib/x86, /data/app/com.beostore-2/base.apk!/lib/x86, /data/app/com.beostore-2/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.beostore-2/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.facebook.react.shell.MainReactPackage$9.get(MainReactPackage.java:173)聽
at com.facebook.react.shell.MainReactPackage$9.get(MainReactPackage.java:170)聽
at com.facebook.react.LazyReactPackage.createNativeModules(LazyReactPackage.java:81)聽
at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106)聽
at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1196)聽
at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1166)聽
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1099)聽
at com.facebook.react.ReactInstanceManager.access$800(ReactInstanceManager.java:112)聽
at com.facebook.react.ReactInstanceManager$4.run(ReactInstanceManager.java:927)聽
at java.lang.Thread.run(Thread.java:761)聽
Well, it had worked when I used lower version of RN (not sure well, but seems 0.46.x)
For me works following configuration :
react native in package.json
"react-native": "0.53.0",
dependencies in android/app/build/build.gradle
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "*****"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
dependencies {
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.facebook.fresco:fresco:1.3.0'
compile 'com.facebook.fresco:animated-gif:1.3.0'
}
Yes, I just got it, too.
This was the solution.
compile 'com.facebook.fresco:fresco:1.3.0'
compile 'com.facebook.fresco:animated-gif:1.3.0'
Just wonder why it doesn't work for higher version.
Hi @lin-zy1229, thank you very much for the detailed information!
I think this is the same issue as https://github.com/facebook/fresco/issues/2054 (which is older). Close this one here so we have the other issue to as a single place where we communicate. I'll link to this issue from there as well.
This doesn't mean that this issue is wrong, it's just for focusing communication :) Let me know if you think that these are separate problem and I'll promptly re-open.
@lin-zy1229 works fine
Most helpful comment
Yes, I just got it, too.
This was the solution.
Just wonder why it doesn't work for higher version.