In my app level build.gradle file I have enabled minification
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
Then app crashes when I install the apk in my android device.
When I checked the logcat from Android Studio, I get this error.
FATAL EXCEPTION: mqt_native_modules
Process: com.skoolbag.singleapp, PID: 7895
java.lang.RuntimeException: Could not invoke RNQBSettingsModule.init
at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source:192)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source:147)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
As suggested in similar questions I checked where RNQBSettingsModule is coming from.
What I found was this
Therefore, I added the following code to the android/app/proguard-rules.pro file to not obfuscate this particular package.
-keep class com.quickblox.reactnative.settings.** {*;}
But this this not resolve the issue