millicast / millicast-native-sdk

SDK to build native clients using the Millicast platform.
Other
17 stars 5 forks source link

[Android] Release build variant of app crashes on start up #7

Closed alimomin closed 2 years ago

alimomin commented 2 years ago

I have integrated the Millicast Android SDK (v1.3.0) with my app. When running the debug variant, everything seems to work fine but when I build and run the release variant of the app, the app crashes right on start up. It seems to crash on the line where I do Client.initMillicastSdk(this) in my Application class. The following is the what shows up in the logs:

#01 pc 00000000003eb130  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/base.apk!libjingle_peerconnection_so.so (offset 0x1d44000) (BuildId: 2f621acb1e7d7ee6)
#02 pc 00000000003eb0c8  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/base.apk!libjingle_peerconnection_so.so (offset 0x1d44000) (BuildId: 2f621acb1e7d7ee6)
#03 pc 00000000003ed5f8  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/base.apk!libjingle_peerconnection_so.so (offset 0x1d44000) (BuildId: 2f621acb1e7d7ee6)
#04 pc 00000000003eb1b0  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/base.apk!libjingle_peerconnection_so.so (offset 0x1d44000) (BuildId: 2f621acb1e7d7ee6)
#05 pc 000000000031bbf4  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/base.apk!libjingle_peerconnection_so.so (offset 0x1d44000) (JNI_OnLoad+32) (BuildId: 2f621acb1e7d7ee6)
#18 pc 00000000003db68e  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/oat/arm64/base.vdex (com.millicast.Client.c+42)
#24 pc 0000000000235e68  /data/app/~~QFHBynVUhvMuLfGatZzECQ==/com.eblock.auction-8oi2El49LtDtcYBML9oeug==/oat/arm64/base.vdex (com.eblock.auction.EBlockApp.onCreate+200)
alimomin commented 2 years ago

Looking into this a little further, because this seemed to only happen on release builds I figured it might be a ProGuard issue. In the logs there was more information about missing classes. Adding the following to the ProGuard file fixed the issue:

-keep class org.webrtc.** { *; }
-keep class com.millicast.** { *; }