After completion of my app, it keeps crashing on the very first screens when minify is enabled. The errors seem unrelated to the code written and nowhere to be found on the internet which could've solved the problem without asking this question.
Please check the logs and proguard config provided below and point out any solution if possible.
The error log (I've cut short the repeating part of the log):
31322-31322/com.x.x E/libEGL: Invalid file path for libcolorx-loader.so
31322-31322/com.x.x E/libEGL: Invalid file path for libcolorx-loader.so
31322-31541/com.x.x E/RenderScript: Failed loading RS driver: dlopen failed: library "libRSDriver_mtk.so" not found
31322-31541/com.x.x E/RenderScript: Failed to load runtime libRSDriver_mtk.so, loading default
//Repetition of the below block about 30 times
1391-1391/com.x.x W/com.x.x: Accessing hidden field Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File; (greylist, JNI, allowed)
1391-1391/com.x.x D/com.x.x: Successfully queried cache dir: /data/user_de/0/com.x.x/code_cache
1391-1391/com.x.x D/RenderScript: Setting cache dir: /data/user_de/0/com.x.x/code_cache
1391-1879/com.x.x D/skia: --- Failed to create image decoder with message 'unimplemented'
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: header = [B@531c48e
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: [0][0][0][0][0]
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: headerSize = 0
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: after header = [B@3e824af
1391-1879/com.x.x D/DRM_DCF_DECODER_JNI: nativeDecryptDcfFile: size = 2548, action = 1
1391-1879/com.x.x D/DRM_DCF_DECODER_JNI: nativeDecryptDcfFile: openDecryptSession with offset = 0
1391-1879/com.x.x E/DRM_DCF_DECODER_JNI: nativeDecryptDcfFile: failed to openDecryptSession, trigger showDrmDialogIfNeed
1391-1879/com.x.x E/DRM/DcfDecoder: decodeDrmImage native decrypt failed
1391-1879/com.x.x D/skia: --- Failed to create image decoder with message 'unimplemented'
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: header = [B@531c48e
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: [0][0][0][0][0]
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: headerSize = 0
1391-1879/com.x.x D/DRM/DcfDecoder: decodeDrmImageIfNeeded: after header = [B@6c643c1
1391-1879/com.x.x D/DRM_DCF_DECODER_JNI: nativeDecryptDcfFile: size = 2548, action = 0
1391-1879/com.x.x D/DRM_DCF_DECODER_JNI: nativeDecryptDcfFile: openDecryptSession with offset = 0
31322-31440/com.x.x E/DRM/DcfDecoder: decodeDrmImage native decrypt failed
//Repetition of the above block about 30 times
31322-31440/com.x.x E/DRM_DCF_DECODER_JNI: nativeDecryptDcfFile: failed to openDecryptSession, trigger showDrmDialogIfNeed
1443-1852/? E/InputDispatcher: channel 'c05756c com.x.x/com.x.x.activity.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
Proguard Rules:
# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class com.x.x.models.ClassModel
-keep class com.x.x.utils.Common
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep class * extends com.bumptech.glide.module.AppGlideModule {
<init>(...);
}
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
*** rewind();
}
#-keep class android.graphics.drawable.ColorDrawable
-keep @androidx.annotation.Keep public class *
-dontwarn okio.**
-dontwarn retrofit2.**
-keep class retrofit2.* { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclassmembers class rx.internal.util.unsafe.* {
long producerIndex;
long consumerIndex;
}
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-keep class com.google.gson.* { *; }
-keep class com.google.inject.* { *; }
# Render Script
#noinspection ShrinkerUnresolvedReference
-keepclasseswithmembernames class * {
native <methods>;
}
-keep class android.support.v8.renderscript.** { *; }
-keep class androidx.renderscript.** { *; }
-keep class com.zipow.* { *; }
-keep class com.zipow.cmmlib.AppUtil
No errors apart from these. Have I missed something in the rules?
Edit: I've checked again and again and I've stil not found any errors. The app works well without minifyenabled.
After getting no response here, I contacted one of my known senior guy and figured out a solution.
I could've fixed it if I could see it in logcat which is why I asked this question. So, the solution was that instead of looking into the logcat provided by Android Studio, I should look into the logcat provided by ADB in a terminal. I was using no filter or keyword in Android studio's logcat, it was just not showing anything.
So, I ran a command adb logcat | findstr "app_name"
and I was able to see the issue in Zoom SDK because of proguard. findstr "app_name"
is optional here to filter the log by app name because the log was huge and was hard to filter with adb logcat
.