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.
Related
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.
I have an Xamarin project (On a Mac) that I'm working on. Up until today I was able to Launch it under debug, it would deploy the app and start it up attached so I could hit break points on the device. If I do this in an emulator, things work fine.
So when I run in Debug on Android, it deploys, I get no errors or messages that indicate an issue, but it just stops and is no longer running.
So what I've done
I've uninstalled and re-installed Visual Studio, no change
I've tried on multiple devices, with different OS versions
I've reset my project to be the same as others on the team, they have no issue
I've verified that the same project works fine on my Windows machine.
I've verified that I can run a Release version with no problem, I hit run, it deploys and launches the app just fine.
I can deply the iOS version in an emulator with no problems.
I've verified that if I set Debug Information to Full in the Release project, I have the same issue.
I've rebooted the device, the Mac, uninstalled the app on the device, it doesn't matter.
I'm at a loss, any help would be appreciated.
Well, there are a couple of things that connecting and deploying your app require, including setting the configuration and making sure you have the ADB installed correctly. You can check on Mac by following these steps to install Chrome and DevTools.
Another user suggested(in the comments under question):
"I would suggest trying to delete the Mono Shared Runtime and any Xamarin Android API-XX Support from the installed apps" on your targeted device.
These are the docs on Configuration Management in Xamarin
on Microsoft.com
I know it's very late answer but I had same problem and could solve it so may be it could be helpful for over people facing same problem.
Android csproj file must be located two levels lower than the .sln file. Android will disconnect when debugging if it is located in another location.
For example:
C:\Projects\Mobile\My.Xamarin.sln
C:\Projects\Mobile\My.Xamarin\My.Xamarin.Android\My.Xamarin.Android.csproj
I was working on an android app to push FCM notifications.
Now this debug app was getting installed on my mobile properly, however since am using my office laptop with intel-vt (HAXM) disabled I could not use the emulator and since the USB is also disabled, I could not use the ADB to side load.
So I was left with building the APK and manually side loading it on my mobile every time I made even a small change.(Redmi Note 5 Pro).
Now this app was working fine till the last time I uninstalled it.After which I tried to install the new version which failed with error "App not installed". Then I went on to install the older version thinking I might have screwed up something in the latest version, however all the older version APKs which were working absolutely fine earlier (at least they were installing i mean) stopped getting installed with the same error.
I have already uninstalled the older version and have double checked from system and there is no earlier APK existing on my mobile.
This is driving me crazy and has put a complete halt on my work as this is the only mobile I have. And yes I have tried restarting my mobile, I have even disabled MIUI optimizations from developers menu.
PS - I am an extreme noob at Android and have recently started with Android development so please forgive me if my question sounds very silly.
Appreciate any help I can get on this.
Please follow the following steps:
Go to Settings -> Permissions -> Install via USB: Uncheck your App if
it's listed.
Go to Settings -> Additional Settings -> Privacy: Check the Unknown
Sources option.
Finally go to Settings -> Additional Settings -> Developer options:
Check the Install via USB option.
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"
i have one doubt,i have created new project in eclipse with android 2.3.1 and try to debug directly from eclipse to device.and it's wokring well,it's debugg in device.now when i am converting that version of android 2.3.1 to GoogleApi 2.3.1 by right clicking project and changing android property.after that when i run my project i am getting such warrining kind of symbol as u can see in below image.
again when i am changing version to simple android 2.3.1 than it's get debugging from eclipse to device.
my device name is Sony Ericon Walk Man Live and ya one more thing Google API version working well when i copy apk to sd card directly and installed in device,but getting problem only when i am running from eclipse to device directly.
One another thing i noticed is that when i create a simple project than right clicking project and runing it's asking me to wether to run in device or emulator but in older one it's not even asking and directly running in emulator...in both's project manifest there is no tag like android:debuggable="true/false" also...
any one have idea what is a solution of this problem i have already insatlled device driver to pc as well.
please help me to short out this
Thanks in advance
Aamirkhan I.
Enabling USB debugging is key, but there's something else as well. Eclipse, by default, runs your application automatically after the first run. So, if you choose an emulator as your first run, Eclipse will default to run by emulator every run afterwards.To change this, go to your "Run Configurations".
There will be an option to run manually or automatically.
Choose "Manual" and you will prompted to choose between your emulator and device every time you decide to run. Otherwise, you can set whether to run automatically with your device or emulator.
try as in this link
If you already connected your mobile device with your computer via the USB cable, please unplug it from your phone, otherwise your device will prompt you a warning requesting to do so.