Zendesk 与 Flutter 集成

问题描述 投票:0回答:1

我正在使用 flutter 创建移动应用程序,我想使用 flutter 集成 Zendesk SDK,因为我做了研究,我知道 zendesk 无法为混合应用程序提供支持,仅提供本机 SDK,但仍然有一些插件提供支持但它太旧了,对我不起作用,下面是我尝试过的插件。

第一个插件

第二个插件

这是第二个插件的代码

await Zendesk.initialize(<account key>, <application id>);

但是我无法在android中运行应用程序,下面是我面临的错误

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.zendesk:chat:3.1.0.
     Required by:
         project :app > project :zendesk_plugin
      > Could not resolve com.zendesk:chat:3.1.0.
         > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'.
            > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.zendesk:messaging:5.1.0.
     Required by:
         project :app > project :zendesk_plugin
      > Could not resolve com.zendesk:messaging:5.1.0.
         > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'.
            > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.zendesk:chat-providers:3.1.0.
     Required by:
         project :app > project :zendesk_plugin
      > Could not resolve com.zendesk:chat-providers:3.1.0.
         > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'.
            > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 43s
Running Gradle task 'assembleDebug'...
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.zendesk:chat:3.1.0.
     Required by:
         project :app > project :zendesk_plugin
      > Could not resolve com.zendesk:chat:3.1.0.
         > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'.
            > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.zendesk:messaging:5.1.0.
     Required by:
         project :app > project :zendesk_plugin
      > Could not resolve com.zendesk:messaging:5.1.0.
         > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'.
            > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.zendesk:chat-providers:3.1.0.
     Required by:
         project :app > project :zendesk_plugin
      > Could not resolve com.zendesk:chat-providers:3.1.0.
         > Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'.
            > Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 12s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

任何人都可以告诉我如何解决这个问题或任何其他方式将 Zendesk 与 flutter 集成

谢谢

flutter zendesk zendesk-app zendesk-sdk
1个回答
0
投票

不幸的是,截至 2023 年底,pub.dev 上还没有适用于 Zendesk 的现成解决方案。

但是,您可以基于 iOS 和 Android 的本机 SDK 实现自己的插件。

为此,您可能需要查看此文档作为起点:https://docs.flutter.dev/packages-and-plugins/developing-packages 因此,您将拥有一个 Dart 插件代码,它将通过 MethodChannel 与底层平台 SDK 进行通信,具体取决于您运行代码的平台。

我目前正在从事一个项目,开发人员使用 Zendesk Support SDK 为他们自己的产品实现了此类插件,并且它已经在生产中运行了几年。

© www.soinside.com 2019 - 2024. All rights reserved.