【发布时间】:2021-07-12 02:39:19
【问题描述】:
我的应用程序完成后,当启用缩小时,它会在第一个屏幕上不断崩溃。这些错误似乎与编写的代码无关,并且在互联网上找不到任何地方都可以在不问这个问题的情况下解决问题。
请检查下面提供的日志和 proguard 配置,并在可能的情况下指出任何解决方案。
错误日志(我已经缩短了日志的重复部分):
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 规则:
# 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
除此之外没有错误。我是否遗漏了规则中的某些内容?
编辑:我一遍又一遍地检查,我仍然没有发现任何错误。该应用在没有启用 minify 的情况下运行良好。
【问题讨论】:
标签: android kotlin proguard minify