Scarlet icon indicating copy to clipboard operation
Scarlet copied to clipboard

java.lang.IllegalArgumentException: Receive method must return ParameterizedType: public abstract io.reactivex.Flowable com.example.demo.DemoWebsocketService.observeCustomInfo()

Open PanPersonalProject opened this issue 1 year ago • 1 comments

if isMinifyEnabled = true,app will crash : java.lang.IllegalArgumentException: Receive method must return ParameterizedType: public abstract io.reactivex.Flowable com.example.demo.DemoWebsocketService.observeCustomInfo()

env: gralde 8.7 agp8.5.0 jdk 17

source link: https://github.com/PanPersonalProject/BaseAndroidFramework

PanPersonalProject avatar Jul 11 '24 09:07 PanPersonalProject

i fit this problem,just keep rxjava -keep class io.reactivex.** { *; }

PanPersonalProject avatar Jul 11 '24 09:07 PanPersonalProject

Hello, I am using Scarlet along with kotlin coroutines FlowStreamAdapter. I encountered the same problem, so I note the solution.

java.lang.IllegalArgumentException: Receive method must return ParameterizedType: public abstract kotlinx.coroutines.flow.Flow

-keep class kotlinx.coroutines.flow.Flow { *; }

# From https://github.com/Tinder/Scarlet/issues/155#issuecomment-828994395 thx!
-if interface * { @com.tinder.scarlet.ws.* <methods>; }
-keep,allowobfuscation interface <1>
-keepclassmembers,allowshrinking,allowobfuscation interface * {
    @com.tinder.scarlet.ws.* <methods>;
}

nacatl avatar Apr 16 '25 08:04 nacatl