Failed resolution of: Landroidx/localbroadcastmanager/content/LocalBroadcastManager

简介: Failed resolution of: Landroidx/localbroadcastmanager/content/LocalBroadcastManager

集成android mqtt的时候报错:


java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/localbroadcastmanager/content/LocalBroadcastManager;


在谷歌官网找到这个类被废弃了,应该是mqtt源码实现使用了这个类,导致找不到类而报错,解决方案是:在build.gradle里添加依赖:


implementation 'com.android.support:support-v4:30.4.1'


其中30:是指你的编译版本,这个操作应该是,v4兼容包里有LocalBroadcastManager。


    implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0'
    implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
    implementation 'com.android.support:support-v4:30.4.1'


目录
相关文章
|
缓存 PHP
Composer 报错 Error while processing content unencoding: Unknown failure within ...
Composer 报错 Error while processing content unencoding: Unknown failure within ...
222 0
|
6月前
|
存储 缓存 自然语言处理
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
54 1
|
7月前
|
前端开发
Google Earth Engine(GEE)——argument ‘input‘: Invalid type. Expected type: Image<unknown bands>错误
Google Earth Engine(GEE)——argument ‘input‘: Invalid type. Expected type: Image<unknown bands>错误
83 0
|
编解码 定位技术
Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
329 0
Google Earth Engine——Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid type的错误解决
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
337 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
|
前端开发
Google Earth Engine——Layer error: Description length exceeds maximum.解决办法
Google Earth Engine——Layer error: Description length exceeds maximum.解决办法
677 0
Google Earth Engine——Layer error: Description length exceeds maximum.解决办法
Failed resolution of: Lokhttp3/internal/Platform;
Failed resolution of: Lokhttp3/internal/Platform;
179 0
|
存储 缓存 应用服务中间件
解决问题:net::ERR_CONTENT_LENGTH_MISMATCH 206 (Partial Content)
问题 今天遇到一个问题,Web 播放器在播放对象存储服务中的某个视频文件时,总是不断的报错 206(Partial Content),具体的信息如下: net::ERR_CONTENT_LENGTH_MISMATCH 206 (Partial Content) 造成的结果就是视频播放失败。 播放器报错截图如下:
1579 0
解决问题:net::ERR_CONTENT_LENGTH_MISMATCH 206 (Partial Content)
|
Java Apache
Failed to place enough replicas
如果DataNode的dfs.datanode.data.dir全配置成SSD类型,则执行“hdfs dfs -put /etc/hosts hdfs:///tmp/”时会报如下错误: 2017-05-04 16:08:22,545 WARN org.
3317 0