三星多屏 Proguard 与 exoplayer 冲突
samsung multiscreen Proguard conflict with exoplayer
我想发布我的应用程序,但在混淆步骤中我遇到了问题。它在我添加 lobmok 时生成一些警告(或者在我添加 samsung-multiscreen jar 文件时更具体),如下所示:
Warning:com.google.android.exoplayer.MediaCodecAudioTrackRenderer:
can't find referenced class android.media.PlaybackParams
Warning:com.google.android.exoplayer.audio.AudioTrack: can't find
referenced class android.media.PlaybackParams
Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtil:
can't find referenced class android.media.PlaybackParams
Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtilV23:
can't find referenced class android.media.PlaybackParams
Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtilV23:
can't find referenced method 'void
setPlaybackParams(android.media.PlaybackParams)' in library class
android.media.AudioTrack
Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtilV23:
can't find referenced class android.media.PlaybackParams
Warning:com.google.android.exoplayer.chunk.VideoFormatSelectorUtil:
can't find referenced method 'android.view.Display$Mode getMode()' in
library class android.view.Display
Warning:com.google.android.exoplayer.chunk.VideoFormatSelectorUtil:
can't find referenced class android.view.Display$Mode
当我将以下行添加到 proguard-rules.pro 时,其中一些消失了,但是当我启动应用程序时它崩溃了。
-dontwarn lombok.**
也试试这个:
-keep class com.google.android.exoplayer.** { *; }
我认为它是由于 exoplayer 中使用的注释与 multiscreen (lombok)
之间的冲突而引发的
有谁知道如何解决这个问题?
最后我通过以下 proguard-rule 解决了这个问题:
-ignorewarnings
-dontoptimize
-dontobfuscate
-dontskipnonpubliclibraryclasses
-ignorewarnings
-keep class com.samsung.** { *; }
-dontwarn com.samsung.**
-dontwarn com.samsung.multiscreen.BuildConfig
-dontwarn lombok.**
我想发布我的应用程序,但在混淆步骤中我遇到了问题。它在我添加 lobmok 时生成一些警告(或者在我添加 samsung-multiscreen jar 文件时更具体),如下所示:
Warning:com.google.android.exoplayer.MediaCodecAudioTrackRenderer: can't find referenced class android.media.PlaybackParams Warning:com.google.android.exoplayer.audio.AudioTrack: can't find referenced class android.media.PlaybackParams Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtil: can't find referenced class android.media.PlaybackParams Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtilV23: can't find referenced class android.media.PlaybackParams Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtilV23: can't find referenced method 'void setPlaybackParams(android.media.PlaybackParams)' in library class android.media.AudioTrack Warning:com.google.android.exoplayer.audio.AudioTrack$AudioTrackUtilV23: can't find referenced class android.media.PlaybackParams Warning:com.google.android.exoplayer.chunk.VideoFormatSelectorUtil: can't find referenced method 'android.view.Display$Mode getMode()' in library class android.view.Display Warning:com.google.android.exoplayer.chunk.VideoFormatSelectorUtil: can't find referenced class android.view.Display$Mode
当我将以下行添加到 proguard-rules.pro 时,其中一些消失了,但是当我启动应用程序时它崩溃了。
-dontwarn lombok.**
也试试这个:
-keep class com.google.android.exoplayer.** { *; }
我认为它是由于 exoplayer 中使用的注释与 multiscreen (lombok)
之间的冲突而引发的有谁知道如何解决这个问题?
最后我通过以下 proguard-rule 解决了这个问题:
-ignorewarnings
-dontoptimize
-dontobfuscate
-dontskipnonpubliclibraryclasses
-ignorewarnings
-keep class com.samsung.** { *; }
-dontwarn com.samsung.**
-dontwarn com.samsung.multiscreen.BuildConfig
-dontwarn lombok.**