【问题标题】:Emulator: socketTcpLoopbackClientFor: error: fd 52396 above FD_SETSIZE (32768) but the Emulator seems to run properly模拟器:socketTcpLoopbackClientFor:错误:fd 52396 高于 FD_SETSIZE (32768) 但模拟器似乎运行正常
【发布时间】:2020-05-31 22:27:16
【问题描述】:

这些错误列表是什么意思,更重要的是如何修复它们?如果有人还可以评论我应该期待的可能问题可能会促使我采取一些行动,因为我不清楚,因为我的应用程序正在运行并正确显示

我发现了一个与here 有点相似的问题,但在这种情况下,它会阻止启动模拟器并显示“无法连接到端口:5037 上的 adb 守护进程”,而在我的情况下,模拟器正在工作(我可以导航和正确点击按钮)

31/05/2020
18:55   Emulator: Process finished with exit code 0

18:55   Executing tasks: [:app:assembleDebug] in project C:\WSs\FireStoreDemos\AppFirestore

18:55   Gradle build finished in 752 ms

18:55   Emulator: socketTcpLoopbackClientFor: error: fd 52380 above FD_SETSIZE (32768)

18:55   Emulator: socketTcpLoopbackClientFor: error: fd 52380 above FD_SETSIZE (32768)

18:55   Emulator: socketTcpLoopbackClientFor: error: fd 52396 above FD_SETSIZE (32768)

18:55   Emulator: socketTcpLoopbackClientFor: error: fd 52396 above FD_SETSIZE (32768)

18:55   Install successfully finished in 142 ms.: App restart successful without requiring a re-install.

这是启动过程中的控制台

05/31 18:55:37: Launching 'app' on Pixel 3a API 28.
$ adb shell am start -n "com.mycomp.appfirestore/com.mycomp.appfirestore.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.mycomp.appfirestore.test | com.mycomp.appfirestore
Waiting for application to come online: com.mycomp.appfirestore.test | com.mycomp.appfirestore
Connected to process 8310 on device 'emulator-5554'.
Waiting for application to come online: com.mycomp.appfirestore.test | com.mycomp.appfirestore
Connecting to com.mycomp.appfirestore
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/mp.appfirestor: Not late-enabling -Xcheck:jni (already on)
W/mp.appfirestor: Unexpected CPU variant for X86 using defaults: x86
W/ActivityThread: Application com.mycomp.appfirestore is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/System.out: Debugger has connected
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8604', transport: 'socket'
I/chatty: uid=10086(com.mycomp.appfirestore) identical 2 lines
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/chatty: uid=10086(com.mycomp.appfirestore) identical 1 line
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1312)
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:13 and remote module com.google.android.gms.measurement.dynamite:0
    Selected local version of com.google.android.gms.measurement.dynamite
I/FirebaseInitProvider: FirebaseApp initialization successful
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
W/mp.appfirestor: Unsupported class loader
W/mp.appfirestor: Skipping duplicate class check due to unsupported classloader
W/mp.appfirestor: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
    Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
V/FA: onActivityCreated
W/mp.appfirestor: Accessing hidden method Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate; (light greylist, linking)
V/FA: App measurement collection enabled
V/FA: App measurement enabled for app package, google app id: com.mycomp.appfirestore, 1:322838517289:android:c8792f2cb4e1fb14ceae38
I/FA: App measurement initialized, version: 28000
I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
I/FA: To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.mycomp.appfirestore
D/FA: Debug-level message logging enabled
W/mp.appfirestor: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
    Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W/mp.appfirestor: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)
V/FA: Connecting to remote service
D/OpenGLRenderer: Skia GL Pipeline
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 1151344
I/FA: Tag Manager is not found and thus will not be used
D/HostConnection: HostConnection::get() New Host Connection established 0xd8d5af50, tid 8353
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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation: eglCreateContext: 0xd8d167e0: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xd8d167e0: ver 3 0 (tinfo 0xd8d06c70)
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
D/HostConnection: createUnique: call
    HostConnection::get() New Host Connection established 0xd8d5b310, tid 8353
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_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
D/EGL_emulation: eglMakeCurrent: 0xd8d167e0: ver 3 0 (tinfo 0xd8d06c70)
D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 3 2
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 4
V/FA: Inactivity, disconnecting from the service

我正在使用的虚拟设备

Name: Pixel_3a_API_28

CPU/ABI: Google Play Intel Atom (x86)

Path: C:\Users\Cast\.android\avd\Pixel_3a_API_28.avd

Target: google_apis_playstore [Google Play] (API level 28)

Skin: pixel_3a

SD Card: 512M

fastboot.chosenSnapshotFile: 

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: pixel_3a

hw.lcd.width: 1080

hw.initialOrientation: Portrait

image.androidVersion.api: 28

tag.id: google_apis_playstore

hw.mainKeys: no

hw.camera.front: emulated

avd.ini.displayname: Pixel 3a API 28

hw.gpu.mode: auto

hw.ramSize: 1536

PlayStore.enabled: true

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 2220

vm.heapSize: 256

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.audioInput: yes

image.sysdir.1: system-images\android-28\google_apis_playstore\x86\

showDeviceFrame: yes

hw.camera.back: virtualscene

AvdId: Pixel_3a_API_28

hw.lcd.density: 440

hw.arc: false

hw.device.hash2: MD5:0e6953ebf01bdc6b33a2f54746629c50

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Google Play

runtime.network.latency: none

disk.dataPartition.size: 6442450944

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

我更喜欢使用 Android 10,但无法正常工作。我创建了另一个question for that with complete different error

已安装 SDK 工具

最后,据我所知,所有模拟器端口:

C:\Users>netstat -ano | findstr "5037"

  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       7892
  TCP    127.0.0.1:5037         127.0.0.1:49735        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51843        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51855        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51859        ESTABLISHED     7892
  TCP    127.0.0.1:5037         127.0.0.1:51867        ESTABLISHED     7892
  TCP    127.0.0.1:49735        127.0.0.1:5037         ESTABLISHED     9604
  TCP    127.0.0.1:51843        127.0.0.1:5037         ESTABLISHED     13184
  TCP    127.0.0.1:51855        127.0.0.1:5037         ESTABLISHED     9604
  TCP    127.0.0.1:51859        127.0.0.1:5037         ESTABLISHED     9604
  TCP    127.0.0.1:51867        127.0.0.1:5037         ESTABLISHED     9604

【问题讨论】:

    标签: android android-studio sockets android-emulator android-sdk-tools


    【解决方案1】:

    我通过从最新的 Canary 版本的 Android Studio 打开模拟器并从我使用的稳定版本运行我的项目,解决了这个问题以及 ADB 守护程序问题。它就像一个魅力。 至于它为什么会起作用,请阅读this。FD_SETSIZE 问题已在“Emulator 30.0.12 Canary”上得到修复,该问题仅适用于 Android Studio 的最新 Canary 版本。

    查看日志的另一个提示是,如果 Android Studio 中未显示,请尝试手动将 firebase/firestore 插件更新为可用的最新版本。

    【讨论】:

    • 什么叫“Android Studio 的 Canary 构建”?
    • 这就像一个 android studio 的 alpha 版本,所有新功能都将可用。而且这些构建中的大多数都是错误的。查看linkhere
    • 在稳定版linkhere旁边安装金丝雀的说明。
    猜你喜欢
    • 2020-09-11
    • 1970-01-01
    • 2022-01-06
    • 1970-01-01
    • 1970-01-01
    • 2012-08-13
    • 2018-03-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多