IM 运行报冲突:Multiple commands produce '/Users/apple/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug-iphonesimulator/xxx.app/Frameworks/ImSDK_Plus.framework',该如何解决?
导致报冲突的原因通常是集成了两个或者以上的 IM SDK,只保留一个即可,常见情形:
1. 客户单独集成 TXIMSDK_Plus_iOS 后,又集成 TUI 组件,通过 TUI 组件又集成了 IM SDK,编译报冲突。
解决:TUIChat、TUIConversation、TUICore 等非音视频相关的 TUI 组件使用 DevelopPods 源码集成 时,可以确认下 .podspec 文件是否依赖 IM SDK,例如 TUICore.podspec 里依赖的是 TXIMSDK_Plus_iOS 的话,可以改成 TXIMSDK_Plus_iOS_XCFramework(和音视频依赖的 IM SDK 统一),然后 pod update。
TUIChat、TUIConversation、TUICore 等非音视频相关的 TUI 组件直接 pod 拉下来的可以尝试 pod update 都更新至最新版本。
报错:Upload Symbols Failed: The archive did not include a dSYM for the lmSDK Plus.framework with the UUiDs[B8B90567-F276-334A-8937-4D327A49AB4C1]. Ensure that the archive's dSYM folder includes a DWARF filefor lmSDK Plus.framework with the expected UUlDs.
报错 Error: The pod "TXIMSDK_Plus_iOS_XCFramework," required by the plugin "tencent_cloud_chat_push" requires a higher minimum iOS deployment version than the plugin's reported minimum version. To build, remove the plugin "tencent_cloud_chat_push", or contact the plugin's developers for assistance. Error running pod install. Error launching application on iPhone 16 Pro.
解决方法:
1. 打开编译器控制台,进入 iOS 目录:cd ios。
2. 删除 Podfile.lock 或 pod.lock 文件(如果存在)。
3. 执行pod更新命令:pod repo update 或 pod install --repo-update。
4. 重新运行项目。
报错原因:
Flutter 中依赖的某个插件版本,本地 CocoaPods 缓存无法检测下载,需要更新。
Flutter 使用多引擎模式,当某个引擎 detach 的时候,会把 IM SDK 的所有 channel 都释放,导致所有引擎都无法使用?
IM Flutter SDK 8.7.7201 版本已优化多引擎支持。
在 iOS 上运行官网 IM Flutter Demo 报如下错误怎么办?
Swift Compiler Error(Xcode): Cannot find type 'PhoneNumber/Users/xia/.pub-cache/hosted/pub.dev/libphonenumber_plugin-.3.3/ios/Classes/SwiftLibphonenumberPlugin.swift:6:24 Could not build the application for the simulator. Error launching application on iPhone 15.
原因:iOS 项目用到了库 libphonenumber_plugin,其中依赖了 PhoneNumberKit 的最新版本。但 PhoneNumberKit 的最新版 4.0.0 是 breaking API change,其中做了改动 “renames the class PhoneNumberKit to PhoneNumberUtility“。libphonenumber_plugin 尚未针对该变动做适配,无法找到 PhoneNumberKit 而报错。
A problem occurred configuring project ':better_player_plus'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
> Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
IM Flutter Demo 选择 web 浏览器运行报如下错误:Finished with error: Failed to bind web development server: SocketException: Failed to create server socket (OS Error: Failed to start accept), address = localhost, port = 63480
解决方法1:打开 Android Studio 在如下截图位置添加以下内容:--web-hostname=127.0.0.1。
解决方法2:如果是通过 terminal 命令工具运行,通过如下方式:flutter run -d chrome --web-hostname=127.0.0.1。
Flutter IM SDK 接入后,在 Android、iOS、macOS 和 Windows 都运行正常,但仅在 Web 平台运行报错,报错内容如下:pub-cache/hosted/pub.dev/tencent_cloud_chat_sdk-8.6.7040/lib/native_im/bindings/native_imsdk_bindings_generated.dart:996:19: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Void>)>>('DartFindMessages');,该如何解决?
Flutter V1 UIKit Demo,选择 Android 平台运行 报如下错误:FAILURE: Build failed with an exception.
FAILURE: Build failed with an exception.
* What went wrong:
Could not open cp_settings generic class cache for settings file'E:\\FlutterProject\\WorkProjects\\v1_demo_and_uikit\\v1_chat-demo-flutter\\android\\settings.gradle'(C:\\Users\\Administrator\\.gradle\\caches\\8.1.1\\scripts\\5f461bs4vludhoc0tr427ffwx).
> BUG! exception in phase 'semantic analysis'insource unit '_BuildScript_' Unsupported class file major version 65
* 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 morehelp at https://help.gradle.org
BUILD FAILED in 1s
原因:
Unsupported class file major version 65(版本 65 对应的是 Java 21(Java 每个版本都有一个 class 文件版本号))。