alamin-karno / flutter-crisp-chat

A flutter plugin package for using crisp chat natively on Android & iOS.
MIT License
9 stars 4 forks source link

Build fail due to crisp_chat dependency #4

Closed BghinC closed 7 months ago

BghinC commented 8 months ago

Hello! My app functions well in debug mode on both iOS and Android when using this package. However, the build fails on both iOS and Android.

Here is the related Android error:

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /<app_path>/build/app/outputs/mapping/prodRelease/missing_rules.txt.
ERROR: R8: Missing class com.caverock.androidsvg.SVG (referenced from: android.graphics.drawable.Drawable io.noties.markwon.image.svg.SvgMediaDecoder.decode(java.lang.String, java.io.InputStream))
Missing class com.caverock.androidsvg.SVGParseException (referenced from: android.graphics.drawable.Drawable io.noties.markwon.image.svg.SvgMediaDecoder.decode(java.lang.String, java.io.InputStream))
Missing class org.bouncycastle.jsse.BCSSLParameters (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context)
Missing class org.bouncycastle.jsse.BCSSLSocket (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 5 other contexts)
Missing class org.bouncycastle.jsse.provider.BouncyCastleJsseProvider (referenced from: void okhttp3.internal.platform.BouncyCastlePlatform.<init>())
Missing class org.conscrypt.Conscrypt$Version (referenced from: boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int))
Missing class org.conscrypt.Conscrypt (referenced from: boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int) and 4 other contexts)
Missing class org.conscrypt.ConscryptHostnameVerifier (referenced from: okhttp3.internal.platform.ConscryptPlatform$DisabledHostnameVerifier)
Missing class org.openjsse.javax.net.ssl.SSLParameters (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List))
Missing class org.openjsse.javax.net.ssl.SSLSocket (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.configureTlsExtensions(javax.net.ssl.SSLSocket, java.lang.String, java.util.List) and 1 other context)
Missing class org.openjsse.net.ssl.OpenJSSE (referenced from: void okhttp3.internal.platform.OpenJSSEPlatform.<init>())

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:minifyProdReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete
alamin-karno commented 7 months ago

I have updated the package today. Hope this problem is solved. @BghinC

BghinC commented 7 months ago

Thanks for the quick update @alamin-karno ! However, I'm still encountering the same error as above on both Android and iOS. Find below the error message during the iOS build:

Encountered error while creating the IPA:
error: exportArchive: ipatool failed

Flutter doctor:

[✓] Flutter (Channel stable, 3.19.2, on macOS 14.1.2 23B92 darwin-arm64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.87.0)
[✓] Connected device (3 available)
[✓] Network resources
alamin-karno commented 7 months ago

I don't know why your project is not creating release build. I'm also using this package for my project, and it is working fine for me to build iOS and Android.

BghinC commented 7 months ago

Thank you for your response. I will try to delve deeper into it when I have more time to dedicate to it. I will let you know if I find something.