Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android8.0集成Mqtt连接报错java.lang.ExceptionInInitializerError #574

Closed
1 task done
sa1510 opened this issue Mar 28, 2018 · 1 comment
Closed
1 task done

Comments

@sa1510
Copy link

sa1510 commented Mar 28, 2018

  • 我已阅读并理解 贡献指南,严格遵循其约定。

错误报告

java.lang.ExceptionInInitializerError
at org.eclipse.paho.android.service.MqttConnection.connect(Unknown Source:320)
at org.eclipse.paho.android.service.MqttService.connect(Unknown Source:5)
at org.eclipse.paho.android.service.MqttAndroidClient.doConnect(Unknown Source:53)
at org.eclipse.paho.android.service.MqttAndroidClient.access$200(Unknown Source:0)
at org.eclipse.paho.android.service.MqttAndroidClient$MyServiceConnection.onServiceConnected(Unknown Source:19)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1645)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1674)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6665)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.eclipse.paho.client.mqttv3.internal.nls.logcat, locale zh_CN
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1557)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1380)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:770)
at org.eclipse.paho.client.mqttv3.logging.LoggerFactory.getLogger(Unknown Source:6)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(Unknown Source:22)
at org.eclipse.paho.android.service.MqttConnection.connect(Unknown Source:320) 
at org.eclipse.paho.android.service.MqttService.connect(Unknown Source:5) 
at org.eclipse.paho.android.service.MqttAndroidClient.doConnect(Unknown Source:53) 
at org.eclipse.paho.android.service.MqttAndroidClient.access$200(Unknown Source:0) 
at org.eclipse.paho.android.service.MqttAndroidClient$MyServiceConnection.onServiceConnected(Unknown Source:19) 
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1645) 
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1674) 
at android.os.Handler.handleCallback(Handler.java:789) 
at android.os.Handler.dispatchMessage(Handler.java:98) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6665) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781) 

你做了什么?

集成Mqtt推送,android8.0系统启动mqtt的service报错(android系统7.1及以下正常)

你期望的结果是什么?

实际结果是什么?

Small环境

Compile-time

  gradle-small plugin : 1.3.0-beta3 (project)
            small aar : 1.3.0-beta3 (project)
          gradle core : 2.14
       android plugin : 2.2.3
                   OS : Mac OS X 10.12 (x86_64)

Bundles

type name PP file size
host app
app app.main 0x77 *_main.so (x86) 10.9 KB
app app.mine 0x16 *_mine.so (x86) 35.5 KB
app app.detail 0x67 *_detail.so (x86) 6.6 KB
app app.home 0x70 *_home.so (x86) 10.4 KB
lib lib.afterutils 0x45 *_afterutils.so (x86) 21.2 KB
lib lib.analytics 0x76 *_analytics.so (x86) 125.7 KB
lib lib.utils 0x73 *_utils.so (x86) 46 KB
lib lib.style 0x79 *_style.so (x86) 44.9 KB
web web.about *_about.so (x86) 24.3 KB

Runtime

  Device :Xiaomi MI 6
     SDK : Android 8.0
     ABI : armeabi-v7a
@joechan-cq
Copy link

MqttAndroid这里有个一样的bug。eclipse-paho/paho.mqtt.android#168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants