Android logcat "application" column is always empty - android

Android logcat "application" column is always empty. I have latest version of android tools.

I tried all the other suggestions here and none of them worked. For me, the application is shown when running on the emulator, but not on my Galaxy Nexus.
It turns out I needed to add android:debuggable="true" to <application> in my AndroiManifest.xml. See http://developer.android.com/guide/topics/manifest/application-element.html. People who use Eclipse don't see this problem because apparently Eclipse enables debugging automatically according to http://developer.android.com/tools/device.html.
Apparently apps need to be marked as debuggable to debug them on production ROMs, but they can be debugged anyway on debug ROMs, which is why it works on the emulator but not on the physical device. Another option is probably to build a debug ROM and install it on your device.
You'd think logcat should be able to figure out the application based on the PID rather than needing to have the app built for debugging.

Another idea:
adb kill-server
adb start-server
Worked for me.

you should enable ADB integration through Tools -> Android, before run your app. Then the log cat will work correctly.
Tools->Android->Enable ADB Integration active

I ran into this problem today. What worked for me was to connect to the emulator (if you have an Intel CPU with virtualization capabilities, run the Intel emulator image with virtualization--it is much faster), launch the app on the emulator and see if the application field comes back to logcat by logging with your app.
For me when connected to the emulator started showing the Application column after trying a few log actions that wrote to the log. After that I connected back to my actual device (Nexus 7), launched the app again from Eclipse, and set DDMS back to the application running on the Nexus 7, and the Application column magically appeared again.
Prior to this I tried various devices (Nexus 4) and restarting Eclipse/adb but nothing worked until I connected to the emulator.

I've tried to fix this strange bug but nothing works. Sometimes application name is blank in logcat and sometimes it's there. I can't even reproduce it. This is not an answer but my quickfix.
Browse through entire logcat and somehow identify the PID of your application and just filter for that in logcat search like this
pid: 10036
or whatever your app PID is.

I encountered this problem after going the route of "Help=>check for updates" to upgrade my eclipse ADT bundle to latest version of ADT plugin. Now there's a couple hours of my life that I'll never get back.....
Unfortunately, nothing I tried would be able to bring back the app name in the application column. In fact, I even got the ADB device offline problem at one point. The first sign that something was wrong was that my android device would show up in the DDMS perspective, but no package name was listed.
I ended up re-installing my ADT bundle (into a new folder), unplugging my device, rebooting, and starting everything up again and using the new ADT bundle.

On my particular case (I'm using Netbeans plus standalone Android Debug Monitor) the "application" column comes back after I:
"Force stop" the app from the device
Run it again from Netbeans > "Run Project"

Related

Android Studio not installing app on device, no error messages

I have a clean Android project on Android Studio (just with a "hello world' screen), and I'm trying to install the app on my Samsung Galaxy S10e.
I click the Run button, and this is what I see in the Build Output:
And the apk is generated successfully.
But it's not launched and not installed on the device (no icon, and it doesn't appear in the apps list).
When I try manually installing the apk by adb install app-debug.apk, it works. The app shortcut appears on the device, it's added to the apps list, and I can launch the app.
At first also adb install didn't work, giving out the error INSTALL_FAILED_TEST_ONLY, but I solved that by adding android.injected.testOnly=false to gradle.properties.
I tried changing Gradle version to 6.0.1 (looks like this is the latest at the moment), and it didn't help.
I also have my device selected at the top:
How can I make Android Studio install and launch the app on my device?
Android Studio version: 3.5.3
Edit:
I'm seeing the same behavior on an Emulator. I opened AVD from Android Studio and chose Pixel 3A. The emulator opens up, I run the app, nothing happens on the emulator (and I see the same Build Output messages).
The same happens to me. It is probably a bug in Android Studio. At the second compilation the app installs correctly. It is tedious.
There isn't enough information to find the cause of this issue.
But since it works with adb, it means you run adb command. There could be only one instance of adb daemon running. So if it's involved externally my guess is Android Studio won't have access to it.
Possibly try adb kill-server and running again from Android Studio and see if that helps.
I encountered the same problem, which I solved by checking the running devices. The connected phone had 2 accounts (might be personal & work) which was listed on the list of devices, so I had to select the second option, and it ran successfully on my phone. see the attached image.
One thing it might be:
Enable usb debugging
Settings
System
Developer options
Turn the setting on for usb debugging
If it does not appear go to settings about phone. Then click on build number like 7-10 times and it will enable you to have the developer options appear.

Android Studio Stuck on "Installing APK"

Android Studio no longer seems to be detecting when an app has installed on a target device and opened. It gets stuck on "Installing APK" and the progress bar is empty. There are no errors, the apk successfully installs and opens, it's just the IDE is still showing "Installing APK" and it does not automatically connect the debugger. I can manually connect the debugger using the "Attach debugger to Android process button", but this is not ideal.
Can anyone offer any suggestions for what's up and how to resolve it?
It turns out the problem wasn't with Android Studio, but with the device I was using for testing. I tried a different device and it behaved normally, progressing beyond "Installing APK" and stopping on breakpoints.
Somehow the "wait for debugger" setting in developer options on the problem device had switched to off. I switched this back on and now this device is behaving normally.
-Note that I had to choose an arbitrary debug app for the setting to become active. Once I'd set it on, I deselected the debug app and the setting remained on, as I left it. This was a HUAWEI P8 running android 6.0 API Level 23.
Recently, I was facing the same issue when I have updated My Device (MI A1) OS from Android Oreo(8.0) to Android Pie(9.0),
Solution: Go to the Settings > Developer options > Now click on > Revoke USB debugging authorisations.
It will disable/remove developer options from your device, Now restart your device once and then you just need to re-enable your developer options and that all you need to do, Enjoy Developing on Pie.
Hope this will help you as well.. :)
I found a solution that works for me. In Developer Options turn off "Monitor apps installed by ADB".
Just reboot your phone (:
It happens after update android version.
On my HTC One I unchecked “Verify apps over USB” in Settings -> Developer Options.
I had this same problem. I solved it by revoking USB Debugging Authorizations and then re-enabling USB Debugging on my chosen device(s).
Edit: Cleaning my project also helped with solving this problem.
for me it was something magic
I solve it by removing the USB from the Laptop and from mobile too(type-c cable) and
turning off the debugging mode and again turn it on
and then I connect it back to my Laptop and selected the same FILE TRANSFER MODE
then run the app and it get installed to my device and work as expected
Hope you will find Useful to
I have this problem recently on my Pixel 2 testing device, latest factory image with Android Studio 3.4, on windows 10.
I have tried all methods mentioned but none of them work. It cost me more than 6 hours to figure it out.
My problem is the USB driver, I am not using the "perfect" USB driver. My driver works in most scenarios and commands but not in every scenario.
You do not need Android Studio to dig into this problem, just using adb.
Please try if you can install apk from adb using following command:
adb install xxxx.apk
If it stuck at "performing streamed install" but never finish, this is the problem.
Please try push a big file(more than 5MB) to your device:
adb push xxxx.apk /storage/emulated/0
In my testing, it stuck at 13%, 16%, etc, but never go on. It seems cannot transfer large files. This is why the installation is pending in my case.
I update the driver to another one, and the problem is fixed. Hope it can solve your problem, too.
I had the exact same problem.
what's more, i can not adb shell and adb push files.
I am running an Ubuntu 18.04 VM and test on xiaomi phone 8,9.
The problem for me was the USB Compatibility setting for the VM was set to 2.0, it needs to be at least 3.0. To change the setting power down the VM and choose the "Edit virtual machine settings" in the VMPlayer startup menu. Then select the "USB Controller" device and change "USB Compatibility" to USB 3.0.
Hope this can help u!
It doesn't hurt to verify your USB port. In my case it was the faulty USB port which I had to switch to the mobo's one instead of the case port.
Restarting Android studio worked for me
I tried rebooting my phone and it worked.
When attach my mobile to my PC, the follow menu is showed. I Clicke on it.
In the next section, I had changed from "USB connection" to "Transfer files"
After that adb install works for me.
In my case, Second Space was created but not switched on. I had to delete the second space and everything worked just fine.
My settings are:
Usb debugging -> ON
Install via Usb -> ON
Verify over USB -> ON
Wait for debugger -> ON
Device: Redmi Note 5 Pro
I had this issue with an emulator on Linux. After trying pretty much every solution and suggestion on this page, what made it work for me was turning off Instant Run.
In my case i did not make sure that my android studio DSK manager was up to date with the android version that my device was operating on. So when running flutter doctor all seemed well, and i had the latest android version and all on android studio, but as mentioned it was not matching the version for my device i had connected.
Once i added the correct android version (in my case android 6.0) with SDK manager using android studio, it did not get stuck at installing apk.
My case was similar but for Android Version 10 required having the Verify bytecode of debuggable apps to off.
Final settings were:
USB debugging -> ON
Wait for debugger -> ON
Verify apps over USB -> ON
Verify bytecode of debuggable apps -> OFF
Device: Pixel XL
For me, the top answer "wait for debugger" was completely greyed out.
What worked for me was to look inside "Apps" and I noticed the app was uninstalled, but only for my current user. Clicking uninstall for all users unblocked the installation via Android Studio again.
Check following in your project
build-gradle plugin version in project level build.gradle file
gradle version in gradle-wrapper.properties file
buildToolsVersion
uninstalling the previous installed app worked for me
Turn off Verify apps over USB and Verify bytecode for debuggable apps (might not be available for all devices) in your Developer settings menu. The install time will decrease drastically.
I'm using Visual Studio Xamarin and the issue was caused by the missing CPU architecture. After checking them, the APK became installable via adb install ...
Just reboot your mobile . If not working try reboot your Android studio and mobile.

Not able to install .apks via adb

I have been working on a particular Android application for sometime and have been able to run these apps via Android Studio quite fine before but since applying a recent update I have not been able to run the app via Android studio because of the following error:
android.os.TransactionTooLargeException
Error: Could not access the Package Manager. Is the system running?
I have tried to troubleshoot this issue by connecting via a different TCP/IP instead of through USB (thinking it was a cable fault of sorts), reinstalling ADB, removing the ADB driver and restarting Android Studio, and all of the above yielded the same error when trying to run the app from Android Studio.
The update that was applied was the addition of the YouTube Android Player to a fragment. The fragment that contains YouTube Player was added to FragmentManager of the parent Activity during the onCreate method of this fragment. Could this be the problem? Or am I looking in the wrong place
Any insight would be appreciated.
You may have gotten this error while attempting to run an Android application on an emulator or device using Android Studio. The most common cause of this error is simple as stated in this link: You have to manually unlock your Android Virtual Device by swiping the "lock" icon on the screen. Security measures prevent the emulator from letting you connect the debugger before doing this. Make sure also that you are running Android Studio version above 0.3.2 or the latest version. There was some issue reported in AS 0.3.2. You can update it from Help >Check for update.
Found this thread which states that it might be an issue with your emulator not with Android Studio. Maybe you are trying to install application before even the emulator started properly. Wait till the home screen appears in the emulator before trying to install any application.
Also try to install any apk in Emulator from command line
Steps to install
Go to $Android_SDK_DIR\platform-tools, right click there keeping shift key pressed and Chose "Open Command Window here".
Run command adb devices to make sure yout emulator is running properly. It will show all your running emulators.
Now if emulators are showing properly, type the command adb install YOUR_FULL_APK_PATH , YOUR_FULL_APK_PATH is of any .apk
file path in your system.
You need to wait for the emulator to full start which may take a few minutes. Once it is fully started (UI on the emulator will change), it should work. You will need to restart the app after the emulator is running and choose the running emulator when prompted. You can check on this bug report the full details.
Hope this helps!
I'm not sure, but check if this works.
menu>> tools>>Android>>Enable ADB integration check it

Android Studio not running application

I'm having an issue where the app I'm working on is not deploying to the device when I'm ready to test it out. It used to do it just fine, but then I updated to 5.0.1 Lollipop, which I believe to be the culprit. Besides downgrading back to 4.4.4 KitKat, which is quite the process on my bootloader-locked Galaxy S4, what can I do to resolve this? ADB recognizes my device and the project builds with no errors/warnings. However, the app does run and work normally if I build the signed APK manually and send it to my device via email/PushBullet which is just a lot of extra, unnecessary steps.
I'm sorry for the lack of information, I'll update as tips come along as to what I've tried. I don't know where to start. One thing I have tried was changing all compile sdk versions to 21, but no dice. It does pop up with the green bubble "session 'app' running" but nothing happens on the device. Also, the ADB pane reports "no debuggable applications." The big issue here is that I can't debug my applications at this point since I can't view the logcat. Any help would be greatly appreciated.
My phone has SuperSU (a rooting app) which updated and caused this problem. As part of the update it had switched off the preference to allow processes running as system user to gain root access without confirmation. I simply enabled the 'Trust system user' option and it worked as normal.
Hope this helps someone :)
Please un install the application if already installed and install again.
there is a kind of issue that application installed but not auto launched. You nee to launched explicitly but If app is already installed then you can't identify that your new installation works or not.
Once un install and install again and track if found installed.
Open the "Edit Configurations" pane and click the '+' button. Select the option to create a new 'Android Application' and then select the correct module. Apply, and you can then delete the test configuration you were using before if you wish. Then everytime you run, make sure you are running as an Android Application and not a test and it will auto-launch on install.
It turns out on my device (Galaxy S4 Lollipop) they added a security feature which didn't allow for ADB installs. The solution was to get root permissions and install adbd Insecure app from Chainfire and run it. Works flawlessly now.

Ubuntu 12.10 + Eclipse 3.8 setup for Android questions

So, I'm just trying to get into Android development and trying to setup my system with eclipse so I can run through the tutorials and whatnot to familiarize myself with the ecosystem. I'm running this on Ubuntu 12.10 (amd64) with eclipse version 3.8. I've run into a couple issues/questions with the initial setup and I'm not sure what to do about them...
1 - I don't seem to get the "adb devices" command to see any devices. I have both a Verizon Galaxy Nexus and a Nexus 7 tablet connected to my system and nothing is seen. I tried adding a couple Vendor IDs to the adb_usb.ini file, but that doesn't seem to have done the trick. The two IDs I added are "0x4e41" and "0x18d1" - I thought the latter was the "Google" device ID, but I'm obviously mistaken somewhere.
2 - I don't have anything configured under the "Run" button and I'm not sure how to configure running apps through the AVD emulators or through a device. I'm pretty sure I'm not going to be able to run any apps through my devices since adb isn't seeing them, but I do have a 4.1 AVD setup, which should be able to run any apps created. How do I configure the Run button to push the app through the emulator? Does it need to be started first or can it start the emulator and push the app automatically? Also, once I resolve the issue above in part 1, how do I configure the Run button to send apps to either of my devices?
Any/all help would be much appreciated. Thanks in advance.
EDIT: As both comments up till this point have mentioned using the Run menu, but I don't seem to have the same Run menu as either of you. The only thing I have under the Run menu is
"External Tools", then under that is
"Run As" (which is a sub-menu with nothing under it - I assume since I've not configured anything),
"External Tools Configuration..."
"Organize Favorites...".
I'm not seeing anything relating to "Run Configurations" at all.
EDIT2: I just tried adding the udev rules file as mentioned in the "Using hardware" page on d.android.com and that doesn't seem to have had any affect (even after reboot). Still not able to see any devices in "adb devices". And, yes, my devices both have USB debugging turned on.
EDIT3: Seem to have gotten the devices to show up in the adb devices listing, but still not sure how to load the apps onto them automatically. Also, I tried running the "ant debug" command listed on http://developer.android.com/training/basics/firstapp/running-app.html and I'm getting an error of:
Buildfile: build.xml does not exist!
Build failed
Not sure what should be in the build.xml file as this is just supposed to be the tutorial app.
Usb does not need to be set up on ubuntu
you may need to switch adt from stable to beta see notes - that may work
reinstalling does not work.
I did the upgrade and adt broke completely - fails on WST or something like that.
Have a look at the tutorial at http://developer.android.com/tools/device.html
First make sure that you have the USB drivers. Make sure your Nexus device is set up for development. Load your drivers. It may be necessary to restart Eclipse to ensure that your new config takes effect.
You can start your AVDs through the AVDManager, or from Eclipse. Go to Run-> Run Configurations to set up which device to send apps to, or which emulator to start up.
1) Have you set your Application to debuggable? Also, don't forget to set your device up to USB Debugging mode.
Then try this at the terminal:
cd android-sdk-linux/platform-tools/
su
killall adb
./adb usb
2) Go to Run > Run Configurations > Target tab > Select your 4.1 AVD (on Automatically pick compatible device) and hit run. After that you will just have to click on run do test your app.

Categories

Resources