How can I have logcat window not on top of other windows - android

Is there some way of having the logcat window not being always on top?
I seldom have a use of such windows, and I cannot find a reason logcat would be an exception.

Try to minimize the Eclipse and drag logcat outside the Eclipse

There's no requirement that you run logcat through eclipse at all - you can run adb logcat from the command line shell of your host operating system. This also allows you to capture the output, make interesting filters with grep and so on.
The location of the adb executable has changed in different releases of the android tools; currently it's in the platform-tools/ directory of the installation, so if that is not in your path you will have to explicitly specify the location.

Related

Android AIDE, logcat scrolling on runtime error

On every runtime error in AIDE (when the application crashes) the logcat window is displaying all messages again (even from the last days) which needs long time to scroll to the end to find out what's wrong. I don't want always clear the logcat list before i compile the project, but i did not find any setting to avoid this behavior. Does anyone have a solution for this?
Actually you can have command line,use
Terminal IDE if your device is running on android 4.x
or lower,
Termux if Lollipop+,
launch your app within one of these Terminal Emulators with am command:
am start -a android.intent.action.Main -n com.your.package/.Ur_Main_Activity
And then use the logcat command to observe log, it will be a bit cumbersome though, use filters as you see fit. Enter ctrl+C to end Logcat dump. Hope this helps,

adb is not recognized as an internal or exteral command error in Android studio

My application code is written and executed with no errors. However my emulator will not show up nor does my android device that's plugged in (virtualization is turned on, SDK packages are downloaded, Hyper V is not installed). I get this message from the ADB console:
adb is not recognized as an internal or exteral command, operable program or batch file.
I have tried editing the %PATH% in both system and user variables but it never works.
I am using the latest Android studio and all the tutorials and answers to my problem refer to Eclipse. At this point I am wondering if I should just abandon Android studio and take refuge in the larger Eclipse community.
Can anyone advise me how to fix it? I've been already trying a long time and I would like to finally see my application in action.
Your PATH is incorrectly setup.
For Windows :
Open up Command Prompt
and type
setx ANDROID_ADB_PATH "pathtoyoursdkplatformtools" /m
example:
setx ANDROID_ADB_PATH "C:\android-sdk-win\platform-tools" /m
Identify the exact location of your SDK. From command prompt cd to that folder and execute adb from there. if it still fails, your installation is corrupted. Delete all previous installtions of Android Studio and install fresh. If it works from adb folder , then you are making a mistake in setting up the path correctly.
set PATH=%PATH%;C:\Program Files\android-sdk-windows\platform-tools
this will only work for that particular session though.With respect to HAXM, always make sure the memory you allocate for a AVD is less than 650MB and check the Use Host GPU checkbox.
You've to set the adb.exe path location here.
You can find that, file>other setting>default project structure>{get your sdk file location}
Ex: C:\Users\Spectrum_Developer\AppData\Local\Android\Sdk
Open this path in file explorer and get into platform-tools. You can see adb.exe here.
Set this current path which is for ex. C:\Users\Spectrum_Developer\AppData\Local\Android\Sdk\platform-tools in your system environmental path variable
Restart the system.
Happy coding :-)

ADB command-line options when debugging from Eclipse?

I am using Eclipse to debug an Android application on a device. I would like to keep the application data between debug sessions. I should be able to do this from the command line with something like this:
adb uninstall -k com.package.myprogram
adb install -r MyProgram.apk
But then, I have to debug on the command-line -- Eclipse is much nicer! Is there anyway to set these options for when I am debugging with Eclipse?? Or somehow set these options through an ADB shell, but then still use Eclipse for catching Breakpoints?
Eclipse does not do any black magic! for all matters ends up accessing adb.exe to talk to the device. by just typing adb on your command line, you will get host of options with which you can do a lot of things. Apart from adb, there are other tools too which can help debug. Research a bit on which suits you best.
Just create a launch configuration for your Android project in Eclipse (in the Run menu). If you modify your application code and run the launch configuration again, Eclipse will install the new version of your application on the device without touching any of its data. There is absolutely no need to uninstall the old version first.

How can I see the error log (logcat) for Android in Eclipse?

How / where can I see what happened when my Android application crashes in Eclipse (using Run, not Debug)?
Window → Show View → Other, then select Android / LogCat
(If you already see the view, but it doesn't seem to show the correct / up-to-date output, try reselecting the desired device in the devices view.)
Sometimes the device gets "out of sync" with eclipse and logcat doesn't show any messages, as you've discovered.
To fix this, try a) going to DDMS and selecting your device; b) closing the logcat tab and creating a new one; c) disconnecting your device and reconnecting it; d) exiting eclipse and restarting it; e) rebooting your device; or f) rebooting your computer, in that order. Usually the problem is fixed by the time you've done a).
I found Eclipse not very reliable and switched to IntelliJ, much happier that way. IntelliJ 9 supports Android development (not the community edition though).
Beside Eclipse DDMS, you can also see the logcat from the command line. Open a shell and change to the folder of your Android SDK, and here to subfolder 'tools'. There you can run
adb shell logcat
which will show you the log.
If you want to explicit distinguish between real device or emulator (in case you're using both), you can add parameters -d or -e
Device:
adb -d logcat
Emulator:
adb -e logcat

Android Debugging with Logcat and Emulator. Is it possible?

This is pretty simple: I'm using NetBeans on Linux with Android emulator 1.6. I have Logcat on my android phone, but the process of getting the messages to somewhere readable isn't smooth at all.
Can someone tell me how to get Logcat running on the emulator? Is there anything I can do to see debug messages other then having to copy the apk to my phone and testing it?
Thanks in advance!
You have a few options for viewing the debug log output, assuming you have the SDK installed and your command path set up correctly:
Type adb logcat. The log output from the connected device or running emulator will appear. I usually prefer adb logcat -v time to see the time stamps.
Type ddms. This launches the stand-alone version of DDMS. It has a logcat display at the bottom.
Install the ADT extension for Eclipse, and open the logcat view. (Since you're using NetBeans I assume this isn't what you want to do, but I'm mentioning it for completeness.)
In all cases, the interaction is the same whether you're using a physical device or software emulator, because the ADB daemon conceals the details. Whatever you're doing for the device is also expected to work for the emulator.
If you have a device and emulator connected simultaneously, you can use adb -e logcat for the emulator and adb -d logcat for the device. From stand-alone DDMS or Eclipse, just pick the device or emulator from the pop-up menu.
If you have setup nbandroid you can find the adb logcat viewer in netbeans under:
Window -> Output -> ADB Log
--edit
Just followed up on the post above and started using C:\Program Files (x86)\Android\android-sdk-windows\tools\ddms which is alot better then the one in netbeans.
The SDK comes with a handy tool called ddms it should be in the tools folder of the SDK.
At the moment an Emulator is running, or a mobile phone is connected to your machine it should show up in ddms and you can see all the log output in ddms.

Categories

Resources