开发者社区 > 物联网 > 正文

aiot-android-demo无法连接阿里云iot

问题描述

现用阿里云iot提供的安卓demo(Paho-MQTT Android接入示例)无法连接阿里云iot,Android studio日志如下

 1/? I/ot_android_dem: Late-enabling -Xcheck:jni
 1/? E/ot_android_dem: Unknown bits set in runtime_flags: 0x8000
 1/? W/ot_android_dem: Unexpected CPU variant for X86 using defaults: x86
 1/com.linkkit.aiot_android_demo D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
 ... W/RenderThread: type=1400 audit(0.0:55229): avc: denied { write } for name="property_service" dev="tmpfs" ino=6969 scontext=u:r:untrusted_app:s0:c137,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
 ... W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
 ... D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
 ... D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
 ... D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
 ... W/ot_android_dem: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
 ... W/ot_android_dem: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
 ... D/HostConnection: HostConnection::get() New Host Connection established 0xd3772f00, tid 15107
 ... D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
 ... W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
 ... D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
 ... D/EGL_emulation: eglCreateContext: 0xded4a5e0: maj 3 min 0 rcv 3
 ... D/EGL_emulation: eglMakeCurrent: 0xded4a5e0: ver 3 0 (tinfo 0xd37aa320)
 ... W/Gralloc3: mapper 3.x is not supported
 ... D/HostConnection: createUnique: call
 ... D/...: HostConnection::get() New Host Connection established 0xd3774710, tid 15107
 ... D/...: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
 ... D/eglCodecCommon: allocate: Ask for block of size 0x1000
 ... D/...: allocate: ioctl allocate returned offset 0x3ff807000 size 0x2000
 ... D/EGL_emulation: eglMakeCurrent: 0xded4a5e0: ver 3 0 (tinfo 0xd37aa320)
 ... D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 0
 ... D/AlarmPingSender: Unregister alarmreceiver to MqttServiceicriEXjfkAE.raspi|timestamp=1681140325778,_v=paho-android-1.0.0,securemode=2,signmethod=hmacsha256|
 ... D/...: ...
 ... I/AiotMqtt: connect failed
 ... I/MqttConnection: Client is not connected, so not sending message
 ... I/AiotMqtt: publish failed!

监控运维 > 日志服务,没有显示安卓端订阅和发布

期望结果

...

已尝试的方法

...

展开
收起
游客pbvelr6eg3muk 2023-04-11 00:58:34 417 0
1 条回答
写回答
取消 提交回答
  • 存在即是合理

    从提供的日志中,我看到了以下错误:

    1、启用时发生晚期enablement错误: - Xcheck:jni。可能的原因是因为你的应用程序依赖于其他库或框架,而这些库或框架还没有被正确启用。

    2、在runtime_flags中出现了未知的bits set。这可能是由于一些其他问题导致的,例如某些库或框架没有正确配置。

    3、启用了unexpected CPU variant。这可能是由于一些编译错误或优化选项导致的,也可能是因为一些特殊的应用场景导致的。

    4、avc: denied { write } for name="property_service" dev="tmpfs" ino=6969 scontext=u:r:untrusted_app:s0:c137,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0。这个错误可能是由于你的应用程序尝试访问一个不存在的文件或目录,或者尝试写入一个不存在的文件。

    5、libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)。这个错误可能是由于你的应用程序尝试访问一个不存在的文件或目录,或者尝试写入一个不存在的文件。

    2023-04-28 17:39:07
    赞同 展开评论 打赏

物联网领域前沿技术分享与交流

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载