如何在HiveMQ Client中修复未定义的MqttChannelInitializer构造函数? [英] How to fix undefined MqttChannelInitializer constructor in HiveMQ Client?

查看:152
本文介绍了如何在HiveMQ Client中修复未定义的MqttChannelInitializer构造函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是HiveMQ客户端1.0.1版,但我决定更新为最新发布的1.1版.我完全从头开始,将项目导入为Gradle项目并尝试构建.仅在忽略一些失败的测试后才能进行构建.我在3个不同的类中遇到3个错误.我意识到这可能与Dagger依赖项注入工具有关,并且我已经成功构建了项目并将build/generated/source/apt/main/目录添加到了我的构建路径,正如我之前的堆栈文章所指出的那样,在该问题中我找不到DaggerSingletonComponent的问题: 如何修复在HiveMQ(MQTT协议)中未解决的DaggerSingletonComponent .这似乎是一个新问题,我不确定出什么问题.我尝试按项目进行重建,但错误仍然存​​在.我在下面留下了一些屏幕截图以及具体的错误.

I was using HiveMQ Client version 1.0.1 but I decided to update to the recently released version 1.1. I completely started from scratch and imported the project as a Gradle project and tried to build. The build work only after ignoring a few failed tests. I'm getting 3 errors in 3 different classes. I realize this is likely related to the Dagger dependency injection tool and I had already successfully built the project and added the directory of build/generated/source/apt/main/ to my build path as noted by my previous stack post where I had issues with a DaggerSingletonComponent not being found: How to fix DaggerSingletonComponent not resolved in HiveMQ (MQTT protocol) . This seems to be a new issue and I'm not sure what's wrong. I tried rebuilding by project but the errors still persist. I've left some screenshot below as well as the specific errors.

HiveMQ:

https://github.com/hivemq/hivemq-community-edition

https://github.com/hivemq/hivemq-mqtt-client

错误:

构造函数MqttChannelInitializer(MqttClientConfig,MqttConnAckFlow,MqttEncoder,MqttConnectHandler,MqttDisconnectHandler,MqttAuthHandler,Lazy)未定义

The constructor MqttChannelInitializer(MqttClientConfig, MqttConnAckFlow, MqttEncoder, MqttConnectHandler, MqttDisconnectHandler, MqttAuthHandler, Lazy) is undefined

构造函数MqttSession(MqttClientConfig,MqttSubscriptionHandler,MqttIncomingQosHandler,MqttOutgoingQosHandler)未定义

The constructor MqttSession(MqttClientConfig, MqttSubscriptionHandler, MqttIncomingQosHandler, MqttOutgoingQosHandler) is undefined

ConnectionModule类型的方法ProvideBootstrap(NettyEventLoopProvider,MqttChannelInitializer)不适用于参数(MqttClientConfig,NettyEventLoopProvider,MqttChannelInitializer)

The method provideBootstrap(NettyEventLoopProvider, MqttChannelInitializer) in the type ConnectionModule is not applicable for the arguments (MqttClientConfig, NettyEventLoopProvider, MqttChannelInitializer)

屏幕截图:

推荐答案

事实证明,该问题是由于目录build/generated/source/apt/main/中的源文件夹出现问题而导致的,该问题没有选项将其他源文件夹中的排除筛选器更新为解决嵌套".选择该选项可以解决所有错误.

The issue turned out to be caused by an issue with the source folder in the directory build/generated/source/apt/main/ not having the option "Update exclusion filters in other source folders to solve nesting" selected. Selecting that option solved all of the errors.

这篇关于如何在HiveMQ Client中修复未定义的MqttChannelInitializer构造函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆