AndroidStudio log not working

I can not get the magazine to work on my phone. I only get this error in Android Studio:

11-01 03: 28: 56.427 24227-24375 / com.example.segall.caveofprogcourse E / GED: Failed to get GED Log Buf, err (0)

Android studio 2.1.3
Ubuntu 16.04 LTS
Sony Xperia M5
android 6.0 api 23

I have USB debugging enabled.

Edit

This code in the onCreate method

Log.d("mylog", " LOG WORKS "); Log.e("mylog", "onCreate called really?"); // I added this Log 

gets the following results:

 11-01 21:51:23.561 7820-7820/com.example.segall.caveofprogcourse E/mylog: onCreate called really? 11-01 21:51:23.619 7820-7873/com.example.segall.caveofprogcourse E/GED: Failed to get GED Log Buf, err(0) 

surprisingly Log.e works. Does anyone know why this could happen?

Edit 2 I created a new project with only two logs in onCreate

  Log.d("mylog","Log.d on create this is not working"); Log.e("mylog","Log.e surprisingly this works"); 

I put some blank lines to make it easy to identify

log filter from application:

 11-02 02:24:08.858 24802-24802/com.example.segall.logapp W/ResourceType: Found multiple library tables, ignoring... 11-02 02:24:08.863 24802-24802/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64 11-02 02:24:08.885 24802-24811/com.example.segall.logapp I/System: FinalizerDaemon: finalize objects = 1 11-02 02:24:09.038 24802-24802/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64 11-02 02:24:09.180 24802-24802/com.example.segall.logapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 11-02 02:24:09.366 24802-24802/com.example.segall.logapp E/mylog: Log.e surprisingly this works 11-02 02:24:09.435 24802-24833/com.example.segall.logapp E/GED: Failed to get GED Log Buf, err(0) 11-02 02:24:09.439 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Initialized EGL, version 1.4 11-02 02:24:09.448 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Get enable program binary service property (1) 11-02 02:24:09.448 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Initializing program atlas... 11-02 02:24:09.449 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Program binary detail: Binary length is 360191, program map length is 152. 11-02 02:24:09.449 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Succeeded to mmap program binaries. File descriptor is 38, and path is /dev/ashmem . 11-02 02:24:09.449 24802-24833/com.example.segall.logapp I/OpenGLRenderer: No need to use file discriptor anymore, close fd(38). 11-02 02:24:09.452 24802-24833/com.example.segall.logapp W/libEGL: [ANDROID_RECORDABLE] format: 1 11-02 02:24:09.569 24802-24802/com.example.segall.logapp I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@aec4c2c time:73133463 

filter registration filter no:

 --------- beginning of system 11-02 02:29:48.790 1014-2030/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.segall.logapp/.MainActivity} from uid 2000 from pid 29625 on display 0 11-02 02:29:48.790 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.START_ANY_ACTIVITY of 2000 is denied. 11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set freq: 1950000 11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set: 4 11-02 02:29:48.793 1014-2030/? I/PowerManagerService: setBrightness mButtonLight 0. 11-02 02:29:48.798 1014-2036/? W/PackageManager: checkUidPermission(): android.permission.WRITE_MEDIA_STORAGE of 10014 is denied. 11-02 02:29:48.798 1014-2036/? W/PackageManager: checkUidPermission(): android.permission.READ_EXTERNAL_STORAGE of 10014 is denied. 11-02 02:29:48.800 330-330/? I/BufferQueue: [unnamed-330-1869](this:0x7fae55d400,id:1869,api:0,p:-1,c:-1) BufferQueue core=(330:/system/bin/surfaceflinger) 11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [unnamed-330-1869](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) connect(C): consumer=(330:/system/bin/surfaceflinger) controlledByApp=false 11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [unnamed-330-1869](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setConsumerName: unnamed-330-1869 11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setConsumerName: Starting com.example.segall.logapp 11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setDefaultBufferSize: width=1 height=1 11-02 02:29:48.803 330-330/? I/BufferQueueConsumer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setDefaultBufferSize: width=1080 height=1920 11-02 02:29:48.803 330-330/? I/SurfaceFlinger: [Built-in Screen (type:0)] fps:1.709773,dur:4094.11,max:3980.13,min:16.10 11-02 02:29:48.807 330-443/? I/BufferQueueProducer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:2,p:1014,c:330) connect(P): api=2 producer=(1014:system_server) producerControlledByApp=false 11-02 02:29:48.807 330-1043/? I/BufferQueueProducer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:2,p:1014,c:330) new GraphicBuffer needed 11-02 02:29:48.809 29645-29645/? I/art: Late-enabling -Xcheck:jni 11-02 02:29:48.809 1014-2036/? I/ActivityManager: Start proc 29645:com.example.segall.logapp/u0a14 for activity com.example.segall.logapp/.MainActivity 11-02 02:29:48.810 1014-1032/? W/PackageManager: checkUidPermission(): android.permission.INTERNET of 10014 is denied. 11-02 02:29:48.815 1014-1036/? I/WindowManager: Focus moving from Window{da2cb0d u0 com.android.systemui/com.android.systemui.recents.RecentsActivity} to null 11-02 02:29:48.815 1014-1036/? I/WindowManager: Losing focus: Window{da2cb0d u0 com.android.systemui/com.android.systemui.recents.RecentsActivity} 11-02 02:29:48.825 1014-1378/? I/libPerfService: perfSetFavorPid - pid:29645, 73cd 11-02 02:29:48.839 29645-29645/com.example.segall.logapp W/ResourceType: Found multiple library tables, ignoring... 11-02 02:29:48.844 330-443/? I/BufferQueueProducer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:330) disconnect(P): api 1 11-02 02:29:48.844 330-443/? I/BufferQueueConsumer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:330) getReleasedBuffers: returning mask 0xffffffffffffffff 11-02 02:29:48.849 330-1043/? I/BufferQueueProducer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:330) disconnect(P): api 1 11-02 02:29:48.851 29645-29654/com.example.segall.logapp I/System: FinalizerDaemon: finalize objects = 1 11-02 02:29:48.853 29645-29645/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64 11-02 02:29:48.975 29645-29645/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64 11-02 02:29:48.977 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.INTERACT_ACROSS_USERS_FULL of 10014 is denied. 11-02 02:29:48.977 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.REAL_GET_TASKS of 10014 is denied. 11-02 02:29:48.977 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.GET_TASKS of 10014 is denied. 11-02 02:29:48.998 330-330/? I/BufferQueueProducer: [FrameBufferSurface_0](this:0x7fb0759000,id:0,api:1,p:330,c:330) queueBuffer: fps=2.00 dur=5985.78 max=5805.78 min=14.24 11-02 02:29:49.063 330-330/? I/BufferQueueConsumer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:-1) disconnect(C) 11-02 02:29:49.064 330-330/? I/BufferQueue: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:-1) ~BufferQueueCore 11-02 02:29:49.128 29645-29645/com.example.segall.logapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 11-02 02:29:49.143 1014-2075/? W/PackageManager: checkUidPermission(): android.permission.INTERACT_ACROSS_USERS of 10014 is denied. 11-02 02:29:49.143 1014-14701/? W/PackageManager: checkUidPermission(): android.permission.INTERACT_ACROSS_USERS_FULL of 10014 is denied. 11-02 02:29:49.213 1014-4093/? I/PowerManagerService: setBrightness mButtonLight 0. 11-02 02:29:49.217 1014-1377/? I/PowerManagerService: setBrightness mButtonLight 0. 11-02 02:29:49.217 1014-1378/? I/PowerManagerService: setBrightness mButtonLight 0. 11-02 02:29:49.219 1014-30758/? I/PowerManagerService: setBrightness mButtonLight 0. 11-02 02:29:49.317 29645-29645/com.example.segall.logapp E/mylog: Log.e surprisingly this works 11-02 02:29:49.320 330-443/? I/SurfaceFlinger: EventThread Client Pid (29645) created 11-02 02:29:49.323 330-443/? I/SurfaceFlinger: EventThread Client Pid (29645) created 11-02 02:29:49.334 330-1043/? I/SurfaceFlinger: [SF client] NEW(0x7fae011a80) for (1014:system_server) 11-02 02:29:49.367 1014-1986/? W/PackageManager: checkUidPermission(): android.permission.STATUS_BAR of 10014 is denied. 11-02 02:29:49.368 330-330/? I/BufferQueue: [unnamed-330-1870](this:0x7fae55e800,id:1870,api:0,p:-1,c:-1) BufferQueue core=(330:/system/bin/surfaceflinger) 11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [unnamed-330-1870](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) connect(C): consumer=(330:/system/bin/surfaceflinger) controlledByApp=false 11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [unnamed-330-1870](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setConsumerName: unnamed-330-1870 11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setConsumerName: com.example.segall.logapp/com.example.segall.logapp.MainActivity 11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setDefaultBufferSize: width=1 height=1 11-02 02:29:49.376 330-330/? I/BufferQueueConsumer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setDefaultBufferSize: width=1080 height=1920 11-02 02:29:49.379 1014-1036/? I/WindowManager: Focus moving from null to Window{4f3b63c u0 com.example.segall.logapp/com.example.segall.logapp.MainActivity} 11-02 02:29:49.379 1014-1036/? I/WindowManager: Gaining focus: Window{4f3b63c u0 com.example.segall.logapp/com.example.segall.logapp.MainActivity} 11-02 02:29:49.380 29645-29672/com.example.segall.logapp E/GED: Failed to get GED Log Buf, err(0) 11-02 02:29:49.384 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Initialized EGL, version 1.4 11-02 02:29:49.394 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Get enable program binary service property (1) 11-02 02:29:49.394 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Initializing program atlas... 11-02 02:29:49.395 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Program binary detail: Binary length is 360191, program map length is 152. 11-02 02:29:49.395 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Succeeded to mmap program binaries. File descriptor is 38, and path is /dev/ashmem . 11-02 02:29:49.395 29645-29672/com.example.segall.logapp I/OpenGLRenderer: No need to use file discriptor anymore, close fd(38). 11-02 02:29:49.398 330-440/? I/BufferQueueProducer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:1,p:29645,c:330) connect(P): api=1 producer=(29645:com.example.segall.logapp) producerControlledByApp=true 11-02 02:29:49.398 29645-29672/com.example.segall.logapp W/libEGL: [ANDROID_RECORDABLE] format: 1 11-02 02:29:49.399 330-1044/? I/BufferQueueProducer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:1,p:29645,c:330) new GraphicBuffer needed 11-02 02:29:49.406 330-443/? I/BufferQueueProducer: [StatusBar](this:0x7fb075a400,id:8,api:1,p:1335,c:330) queueBuffer: fps=0.15 dur=6482.88 max=6482.88 min=6482.88 11-02 02:29:49.460 1014-1036/? I/ActivityManager: [AppLaunch] Displayed Displayed com.example.segall.logapp/.MainActivity: +661ms 11-02 02:29:49.460 1014-1036/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{548a061 u0 com.example.segall.logapp/.MainActivity t1972} time:73473354 11-02 02:29:49.460 1014-1231/? I/libPerfService: 1: set: 1 11-02 02:29:49.460 1014-1231/? I/libPerfService: 1: set freq: 0 11-02 02:29:49.460 1014-1231/? I/libPerfService: 1: set vcore level: 0 11-02 02:29:49.515 330-1043/? I/BufferQueueProducer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:1,p:29645,c:330) new GraphicBuffer needed 11-02 02:29:49.531 2491-2496/? I/PerfService: PerfServiceNative_getPackName 11-02 02:29:49.532 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp 11-02 02:29:49.532 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp 11-02 02:29:49.532 1014-1378/? E/PerfService: com.example.segall.logapp 11-02 02:29:49.534 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp 11-02 02:29:49.534 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp 11-02 02:29:49.534 1014-1378/? E/PerfService: com.example.segall.logapp 11-02 02:29:49.534 2491-2496/? I/PerfService: com.example.segall.logapp 11-02 02:29:49.534 2491-2496/? I/PerfService: PerfServiceNative_getPackName 11-02 02:29:49.534 1014-14701/? I/libPerfService: perfGetPackName com.example.segall.logapp 11-02 02:29:49.534 1014-14701/? I/libPerfService: perfGetPackName com.example.segall.logapp 11-02 02:29:49.534 1014-14701/? E/PerfService: com.example.segall.logapp 

logcat screen

+2
source share
2 answers
  • Try not to use the filter in the upper right corner of logcat
  • Recheck that your device is connected and register on the correct device.
  • Choose verbose log type
  • You may need to download the configuration file from the developer console and add it to your project. The second step of this link. File Name - google-services.json
  • check your library configuration, especially Firebase configuration.
0
source

With Linux (Ubuntu), you have a system installed to detect your device. You can check these google recommendations.

You need to add the udev rules file containing the USB configuration for each type of device that you want to use for development.

Before doing this, make sure your application is "debugged" in your manifest or build.gradle file.

  android { buildTypes { debug { debuggable true } 

In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.

Now configure your system to discover your device using the udev rules file. Add a udev rule file that contains the USB configuration for each type of device that you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor identifier, as indicated by the ATTR{idVendor} property. Therefore, you must know the Sonys provider ID in your case: 054c

  • Log in as root and create this file: /etc/udev/rules.d/51-android.rules

ie

 sudo gedit /etc/udev/rules.d/51-android.rules 

Use this format to add each provider to a file: 054c is the sonys provider ID.

 SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev" 

If you add SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev" Android studio will detect Sony.

  1. Now do: chmod a+r /etc/udev/rules.d/51-android.rules

Close and start Studio. Then run the project. The studio will find him

-1
source

Source: https://habr.com/ru/post/1214811/


All Articles