iyegoroff / react-native-image-filter-kit

Various image filters for iOS & Android
MIT License
320 stars 42 forks source link

Not working some instagram filters in Android release build with enabled ProGuard #89

Closed NikitaDudin closed 2 years ago

NikitaDudin commented 2 years ago

Environment

react-native-image-filter-kit: 0.8.0 Platform: Android Project settings:

        buildToolsVersion = "30.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "22.1.7171670"

OS: MacOS Big Sur 11.6 (20G165) Node.js: 16.13.0 xCode: 13.1 (13A1030d) android/app/build.gradle:

def enableProguardInReleaseBuilds = true

react-native: 0.64.3

Solution

add to android/app/proguard-rules.pro file:

# react-native-image-filter-kit https://github.com/iyegoroff/react-native-image-filter-kit/issues/89
-keep class com.facebook.react.views.image.** { *; }
-keep class com.facebook.drawee.** { *; }

Linked issue

iyegoroff commented 2 years ago

Thank you! Just updated the readme with your solution.