clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

I can't use adb logcat while my app is running #58

Closed krisc closed 11 years ago

krisc commented 11 years ago

I've mentioned this in my other issues, and I've been developing without it so far, but it would be useful if I had adb logcat handy while I'm developing interactively.

lein droid forward-port causes adb logcat to exit. If I run adb logcat after lein droid forward-port it causes my nREPL to disconnect. Basically, I can't have adb logcat running while my app is also running.

alexander-yakushev commented 11 years ago

That is very unusual. Are you sure that forward-port causes logcat to fail? So adb logcat works until you execute forward-port for the first time, and then you can't use adb logcat anymore? What if you just launch the application from the device without doing forward-port (after device reboot, for example) and then try adb logcat?

Also, which version of the Android Build Tools do you use?

krisc commented 11 years ago

Yeah that works but I won't have a REPL since I can't connect to my running app via nrepl without doing forward-port. When I have a running REPL then run adb logcat, nrepl in emacs gives me

nrepl connection closed: connection broken by remote peer

Then when I try to connect again while adb logcat is running, emacs tells me:

make client process failed: connection refused, :name, nrepl, :buffer, *nrepl-connection*, :host, 127.0.0.1, :service, 9999, :nowait, nil

I am using version adb version 1.0.29.

alexander-yakushev commented 11 years ago

Can you try updating your Android Build Tools to 18.0.0? To do that, run <android-sdk-dir>/tools/android binary and select Android SDK tools and Android Build tools to update.

krisc commented 11 years ago

I already have installed Android SDK Build Tools installed at version 18.0.1, but adb is 1.0.29

alexander-yakushev commented 11 years ago

This is strange, my adb is 1.0.31.

So you say that adb logcat outputs the log and stops? Or it doesn't even start?

krisc commented 11 years ago

yes, it outputs the log and when I run forward-port it stops and exits (terminal goes back to prompt)

alexander-yakushev commented 11 years ago

And if you run adb logcat afterwards, does it do anything?

krisc commented 11 years ago

Okay I got it. I've been running adb without qualifying the directory. Apparently the version of adb installed on my system is 1.0.29. The version of adb in my platform-tools/ directory is 1.0.31 and using this one works fine. Awesome!

alexander-yakushev commented 11 years ago

Wow, that was really tricky to figure out. Glad it works now!