Flutter中不必要的UI日志

时间:2020-04-09 08:06:58

标签: flutter

自从我将颤动和切换通道升级到Beta版以来,控制台日志中的垃圾邮件被我不需要查看的信息所困扰。即使当我触摸屏幕时,也会记录3行消息。请告诉我如何禁用它。

W/FirebaseApp(23046): Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project.
W/scm.scmstudyap(23046): Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist, reflection, allowed)
W/scm.scmstudyap(23046): Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed)
W/scm.scmstudyap(23046): Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
W/scm.scmstudyap(23046): Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
D/WindowManager(23046): Add to mViews: DecorView@ec123cf[MainActivity], this = android.view.WindowManagerGlobal@23f815c,pkg= com.scm.scmstudyapp
E/ANR_LOG (23046): >>> msg's executing time is too long
E/ANR_LOG (23046): Blocked msg = { when=-3s175ms what=159 target=android.app.ActivityThread$H obj=ClientTransaction hashCode, mActivityToken = android.os.BinderProxy@480de2b } , cost  = 2560 ms
E/ANR_LOG (23046): >>>Current msg List is:
E/ANR_LOG (23046): Current msg <1>  = { when=-3s174ms what=159 target=android.app.ActivityThread$H obj=ClientTransaction hashCode, mActivityToken = android.os.BinderProxy@480de2b }
E/ANR_LOG (23046): Current msg <2>  = { when=-3s117ms what=0 target=android.app.ActivityThread$H callback=com.android.internal.util.function.pooled.PooledLambdaImpl }
E/ANR_LOG (23046): Current msg <3>  = { when=-2s858ms what=149 target=android.app.ActivityThread$H obj=android.os.BinderProxy@480de2b }
E/ANR_LOG (23046): Current msg <4>  = { when=-2s416ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
E/ANR_LOG (23046): Current msg <5>  = { when=-2s119ms what=0 target=android.app.ActivityThread$H callback=android.app.-$$Lambda$ActivityThread$A4ykhsPb8qV3ffTqpQDklHSMDJ0 }
E/ANR_LOG (23046): Current msg <6>  = { when=-1s893ms what=1 target=android.os.AsyncTask$InternalHandler obj=android.os.AsyncTask$AsyncTaskResult@7f17d3a }
E/ANR_LOG (23046): Current msg <7>  = { when=-1s599ms what=131 target=android.app.ActivityThread$H obj=android.app.ActivityThread$ProviderRefCount@ad62deb }
E/ANR_LOG (23046): Current msg <8>  = { when=-485ms what=0 target=android.app.ActivityThread$H callback=com.android.internal.util.function.pooled.PooledLambdaImpl }
E/ANR_LOG (23046): Current msg <9>  = { when=-57ms what=0 target=android.view.ViewRootImpl$ViewRootHandler callback=android.view.ViewRootImpl$4 }
E/ANR_LOG (23046): Current msg <10>  = { when=-18ms barrier=0 }
E/ANR_LOG (23046): >>>CURRENT MSG DUMP OVER<<<
D/SurfaceView(23046): 233920328 updateRequestedVisibility, mViewVisibility:true, mWindowVisibility:false, mWindowStopped:false by android.view.SurfaceView.onAttachedToWindow:276 android.view.View.dispatchAttachedToWindow:19798 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewRootImpl.performTraversals:2317 
D/SurfaceView(23046): 233920328 updateRequestedVisibility, mViewVisibility:true, mWindowVisibility:true, mWindowStopped:false by android.view.SurfaceView.onWindowVisibilityChanged:292 android.view.View.dispatchAttachedToWindow:19815 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewGroup.dispatchAttachedToWindow:3449 android.view.ViewRootImpl.performTraversals:2317 
I/SurfaceView(23046): 233920328 Changes: creating=true format=true size=true visible=true left=true top=true
I/SurfaceView(23046): 233920328 mSurfaceControl 99234566 mBackgroundControl 216513991 creating: SurfaceView - com.scm.scmstudyapp/com.scm.scmstudyapp.MainActivity
I/SurfaceView(23046): 233920328 Cur surface: Surface(name=null)/@0x9689ff4, visible=true
I/SurfaceView(23046): 233920328 visibleChanged:true -> SurfaceHolder.Callback.surfaceCreated
W/AnalyticsUserIDStore(23046): initStore should have been called before calling setUserID
W/UserDataStore(23046): initStore should have been called before calling setUserID
I/SurfaceView(23046): 233920328 surfaceChanged -- format=4 w=1080 h=2340 visibleChanged:true -> SurfaceHolder.Callback.surfaceChanged
I/SurfaceView(23046): 233920328 surfaceRedrawNeeded
I/SurfaceView(23046): 233920328 finishedDrawing
V/SurfaceView(23046): Layout: x=0 y=0 w=1080 h=2340, frame=Rect(0, 0 - 1080, 2340)
D/SharedPreferencesImpl(23046): Time required to fsync /data/user/0/com.scm.scmstudyapp/shared_prefs/com.scm.scmstudyapp_preferences.xml: [<1: 0, <2: 0, <4: 0, <8: 0, <16: 0, <32: 0, <64: 0, <128: 0, <256: 0, <512: 1, <1024: 0, <2048: 0, <4096: 0, <8192: 0, <16384: 0, >=16384: 0]
D/SurfaceView(23046): 218715161 updateSurfacePosition RenderWorker, frameNr = 1, postion = [0, 0, 1080, 2340]
W/Gralloc3(23046): mapper 3.x is not supported
I/OpenGLRenderer(23046): Davey! duration=1066ms; Flags=1, IntendedVsync=169569235773894, Vsync=169569235773894, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=169569247167863, AnimationStart=169569247251197, PerformTraversalsStart=169569247254947, DrawStart=169570181088905, SyncQueued=169570205802915, SyncStart=169570206219842, IssueDrawCommandsStart=169570206444478, SwapBuffers=169570298348852, FrameCompleted=169570302773852, DequeueBufferDuration=2480000, QueueBufferDuration=3558000, 
I/Choreographer(23046): Skipped 63 frames!  The application may be doing too much work on its main thread.
I/flutter (23046): null
I/scm.scmstudyap(23046): ProcessProfilingInfo new_methods=5 is saved saved_to_disk=1 resolve_classes_delay=5000
I/scm.scmstudyap(23046): ProcessProfilingInfo new_methods=0 is saved saved_to_disk=0 resolve_classes_delay=5000
D/ColorExSystemServiceHelper(23046): checkColorExSystemService className = com.google.android.gms.ads.identifier.service.AdvertisingIdService
D/ColorViewRootUtil(23046): nav gesture mode swipeFromBottom ignore false downY 578 mScreenHeight 2340 mScreenWidth 1080 mStatusBarHeight 54 globalScale 1.125 nav mode 3 event MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=731.0, y[0]=578.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=169817185, downTime=169817185, deviceId=5, source=0x1002, displayId=0 } rotation 0

1 个答案:

答案 0 :(得分:0)

您可以在终端中运行此命令,以仅查看您使用print(...)方法添加的日志。

flutter logs