现用阿里云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!
监控运维 > 日志服务,没有显示安卓端订阅和发布
...
...
从提供的日志中,我看到了以下错误:
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)。这个错误可能是由于你的应用程序尝试访问一个不存在的文件或目录,或者尝试写入一个不存在的文件。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。