Nothing shows up in my Android Studio Logcat - android

I'm working on a project for my Android class using the latest version of Android Studio (3.4.1) and my app isn't working right. I can't see what's going wrong because nothing shows up in the Logcat.
I'm running my app on a physical phone since Android Studio doesn't like AMD. I have "Show only selected application" selected and it shows my phone is connected. I tried restarting Logcat, but that didn't do anything.
screenshot to show my issue

Just try ,Invalidate and Restart Android Studio or Restart Android Studio.

Keep the device connected. Open terminal from below. Type following command to kill and start adb.
adb kill-server && sudo adb start-server
If the command doesn't work, you will need to fire it from /sdk/platform tools/

Related

Cant run adb process

I'm creating an application in android studio but I am um able test it on the virtual emulator because the adb process won't start. It's giving this error.
I tried manually starting adb and all other things but this happens.
I tried reinstalling android studio and platform tools. I downloaded a separate adb and ran "adb start-server"/"kill server".
It just doesn't seem to work. So i constantly have to build the entire thing and generate apk to run it. Please help me guys!!!
Also regarding the virtual emulator i have intel haxm installed if that information was necessary.
It's may be because your emulator adb not allow the android studio to run on it and android studio try to stop and re-run but this process fail.
Me also the same problem. So i always follows this step and it's work for me.
1. Open android studio.
2. Try to run your app without opening your emulator(It will start your adb).
3. Then open your emulator and run your app.
It's working for me. May solve your problem.
adb server didnt ack. This issue will resolve ussually when you kill all instances of adb.exe and restart server again.
Open Task manager and kill all adb instances and start server again.
Try the following:
Close Studio.
End adb.exe process in taskmanager.
Issue kill and
Run adb kill-server
Run adb devices
Then start the emulator and try adb devices again. This should list your emulator-device.
Run you apk in studio.
If your are using Genymotion,try to link your Android Studio 's SDK to Genymotion Android SDK Path.Then try to type with adb devices, I hope this will help for you.

Error while trying to push/install .apk using adb

I've recently started encountering problems while trying to run my application from Android Studio on my MacOS machine. I tried to run the command from adb myself but I still can't get it to work, although the error appears different.
The errors I get are as follows;
Android Studio
10/02 09:54:53: Launching app $ adb push /Users/{username}/{path-to-apk}.apk /data/local/tmp/{package}
java.io.IOException: Broken pipe
Error while Installing APK
adb (via Terminal.app)
$ adb push /Users/{username}/{path-to-apk}.apk /data/local/tmp/{package}
adb: error: 65536-byte write failed:
Undefined error: 0
Now I've tried a lot of different things, some of which are just stretches because the problem appears to lie in something adb related, but none of this seems to change anything;
Different applications/apks
Different Android devices (total of 5)
Different USB-ports (all 4,
with and without USB-hub).
Different (or no) USB-dongles (USB-C to USB-A)
Restart/Invalidate Caches (Android Studio)
Reinstall Android Studio
Reinstall Android SDK
New (separate) install of Android SDK through homebrew
Reset NVRAM/PRAM
Reset SCM
Update to MacOS Mojave (and retry all of the above).
At this point I am at a loss. Has anyone encountered these errors before without having any of the above solutions fix it? Next thing on my list is a reinstall of the OS, but that feels like a bit of overkill.
I am running on MacOS Mojave on a 2016 Macbook Pro, but everything appeared to have the same effect on High Sierra.
Edit
Weird update on the behaviour, I can get the installing to work continuously after a restart by doing the following steps;
Login
Start Terminal.app
Manually repeat adb push command
(Command executes successfully)
Start Android Studio
Everything works fine...
However, if I start Android Studio without first manually doing the adb push in Terminal, everything is broken as described above.
Edit 2
Even calling adb start-server in Terminal before starting Android Studio makes everything work. So something appears to be faulty when Android Studio is responsible for starting the adb server..
I got the same error. I have no idea but start-server before starting Android-studio
Restart adb with the following command,
adb kill-server && adb start-server
Not really an answer but my issue appears to be solved with the latest release of Android Studio.

project debugs but will not be installed on device

i connect android studio to my phone via usb.
my android project will be work correctly when i debug it.
but when I'm clicking on apk file for installing it quickly stops and
i will receive "unfortunately has stopped" .
and there is no issue on logcat.
If you have the same project syncd on your android studio with same package name on your Android phone you will be able to debug it.
Be careful that this DOES NOT guarantee that you have the same code version on your IDE and in your device.
and there is no issue on logcat
This is highly unlikely.
Please, proceed with these comands on your prompt/bash/terminal:
adb kill-server
adb start-server
adb logcat -c
adb logcat (and press "play" button)
See logs.

Restart ADB from Android Studio

I previously developed on Eclipse and just migrated to Android Studio.
Everything works fine, it's better and faster.
I work on real device, and Android Studio recognizes it without issue.
But when I disconnect and reconnect my device, it doesn't recognize my device anymore, I have to exit and restart Android Studio.
I can't find a way to "Reset adb" like Eclipse Feature.
Can ADB be restarted from within Android Studio? If so, how?
What I usually do when I get this error is restarting the adb server by typing in the command into Terminal:
adb kill-server
adb start-server
However this can be achieved in Android Studio. Clicking the Monitor button you can launch the same program you have referenced from Eclipse.
If you do not see this you may need to update your Platform Tools from the SDK Manager button.
Apart from the above working answer, the ADB can also be restarted during the restart of Android Studio ( File > Invalidate Cache / Restart > Just Restart ).
ADB is down for a reason, therefore a clean restart of Android Studio is suggested.
that did trick for me thanks. resetting adb on android studio fixed my issue of ADB not responding. If you'd like to retry, then please manually kill "adb.exe" and click 'Restart'. spent 2 days trying look for solution to this

Android studio doesn't recognize the running emulator

When I run my app from AndroidStudio 0.4.3 using Run I see Choose Device which has two sections choose a running device or Launch Emulator. I don't have a running emulator at the moment so I click the ... to launch AVD manager and start an emulator. At this point I see that under choose a running device the emulator I just launched shows up but its listed as offline.
In the past the offline status went away when the emulator was fully up and running. However, now I've noticed that when the emulator is launched fully, it no longer appears in choose a running device.
I feel like I'm always playing cat and mouse game with android studio picking up the emulator. Is there a better way to do this? Am I missing something?
Disable and then Enable ADB Integration
In Android Studio go to
Menu -> Tools
Android
Enable ADB Integration (should be checked, click to remove check)
Enable ADB Integration (should not be checked, click to add check)
Run your app again. Emulator that was previously missing from Run dialog should be available to be selected upon which to run your app.
Try to kill the adb server and restart it.
Locate your adb binary (linux/osx) or adb.exe (windows) and do:
adb kill-server
adb start-server
this should fix your problem
Even if your problem still not solved then Restart emulator.
Wipe Data and restarting emulator helped me, hope this helps to someone.
inside AVD manager, select your virtual devices, then 1 stop, 2 wipe user data, 3 cold reboot, works for me.
On Windows, running Android Studio with administrator permissions can help (in addition to restarting adb server).
Unchecking the "Enable ADB " worked for me
In Android Studio Arctic Fox (2020.3.1) it helped me to cold boot the device.
add -port 5037 on ../[some_emulator]/emu-launch-params.txt file & try again...
like image

Categories

Resources