• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Not able to View any action in Logcat.

I am exactly following everything by the letter but still on clicking on button nothing is displayed on logcat.

Please check the attached screenshot

and (Button) is not included as per the Androd Studio which states it's redundant

Android Studio Version is 3.1.2

I am using lenovo k3 note as a device.
 

Attachments

  • Capture.PNG
    Capture.PNG
    31 KB · Views: 104
That should display in your Logcat window.
Just to be sure that your onClick() method is being called, run the app in debug mode, and put a breakpoint in the onClick() method. The code execution should stop at that point.
 
and btw you will definitely need to separate that single onClick() method definition into multiple lines, rather than have it all on one line.
 
and btw you will definitely need to separate that single onClick() method definition into multiple lines, rather than have it all on one line.
Thanks for your replies.

It is solved! The actual problem was not in the android studio but the DEVICE lenovo k3 note I used to perform the action. When I used the emulator, it worked!
 
Back
Top Bottom