I am unable to debug on IntelliJ one of my apps, other apps debug just fine. The issue is only happening on my Galaxy Nexus 4.2.2 and on my Nexus 7 4.4.2. My GS3 with 4.3 works just fine.
The error I get is:
Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse
IntelliJ support says it is an issue with ddms, and I do tend to agree with them because when I open ddms by hand I can see no processes under the phones that don't work but I can see a bunch of processes under the phone that works.
Has anyone else had this issue?
IntelliJ is version 13.0.2 and I am on OSX 10.9.1
Thanks.
EDIT: I should mention I already tried restarting phone and laptop, removing the app from the phone, clearing data, clearing cache, clearing caches on intellij. Also I tried other apps yesterday and they worked just fine on all devices, so it seems to be just one app, I don't know if there is a way to clear something on ddms that it might be remembering about my app?
Turns out that when using an artifact that signs your app you must set debuggable=true on your application on the manifest.
Related
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'm having trouble getting Processing 3.3.6 (x64) for Windows 10 to recognize my LG V20 android device.
At first, I was getting a NoClassDefFoundError when I tried to run a sketch, and the Android SDK updater had 2 suggested updates that I couldn't install due to more errors. My phone was not listed in Processing. The device was I've enabled USB debugging, and the connection works; I can transfer files fine.
After reading across the internet with little advice or success, I tried uninstalling all Android-related files on my computer, as well as any Processing-related files. I uninstalled Java, JRE and JDK. I then reinstalled them all:
Java 8u161 JDK and JRE
Processing 3.3.6
Android SDK (auto-installed by Processing)
It all installed without complaint, and everything seemed fine. However, Processing still can't find or recognize my device. I've also tried these exact steps on my laptop which has a mostly clean install of Windows 10 (apart from chrome and some bloatware) with the same results.
I also tried running something via Processing's emulator; I may have done this wrong, but this comes up with a "Lost connection with emulator while launching" error.
From this, it feels like it HAS to be an issue with the phone, since it's on multiple PCs. But it also HAS to be an issue with the PC, since it occurs on both a phone and an emulator. Frankly, I'm dumbfounded as to what the problem is.
I'm not really sure what else I can do or try; I haven't found my problem anywhere else, and tried the solutions to all similar problems with no success. Does anybody have any ideas?
EDIT: I fixed the problem. I tracked down the location of my adb.exe, and ran "adb devices" in cmd at that location. It listed one
device (mine), and said it was unauthorized. A prompt appeared on my
phone, and upon confirming it, the device was authorized.
first off all check is your device connected to sdk by running this command
sdk/platform-tools/adb devices
if your device name not found make sure that you have USB debug enabled
goto settings/developer settings/ allow USB debug mode
if you don't see this option search how to enable developer settings for your phone mine was like
goto settings/about/software info
and tap constantly on build-number for 7 times
I love Processing and I dreamed with the chance to use it for making Android apps, as the "Android Mode" promises. Both mentioned issues (no device connection + no emulator available) as well as the endless red Java error messages couldn't never be fixed. I tried everything regarding Android Studio & SDK parameters & component installation, as well as different PC plattforms without success. Trying to configure the SDK for matching Processing's requirements was also a waste of time. Nothing helped. People who got it, they neither know how it runs nor why it doesn't.
Forget Processing for Android, use & enjoy programming with MIT App Inventor, and really start running apps in one hour. Let's use Processing for its original purposes.
I have a macbook pro (Retina, 15 inch, late 2013) that is running High Sierra GM (17A365) and a fresh install and blank project in Android Studio always results in a crash (emulator64-crash-service quit unexpectedly.) when trying to run any android emulator. I have tried every suggestion I can find on the internet, NONE of them work. Here is what I have tried so far:
Since I have an external monitor connected to my mac, I tried both creating emulator-user.ini file with window.x values (Android VM crashes on Launch Mac) AND just tried disconnecting second monitor and running just on the macbook. Still crashes
Tried completely (including all prefs and hidden folders) uninstalling Android Studio, rebooting and reinstalling and setting up brand new default environment. Still crashes
Verified that HAXM is installed correctly and running loaded (kextstat | grep intel returns expected info), but have also tried without HAXM. Still crashes
Tried launching emulator from Terminal. Still crashes
Tried creating new avd from avd manager. All of them crash.
Tried changing settings in avd configs to use (or not use) Hardware/Software graphics, as well as fiddling with more or less memory than defaults. Still crashes.
Does anyone have anything left to try? I am pulling my hair out here. I would like to try my cordova app in Android, but it seems impossible from my mac.
I still don't know what caused it, but as a workaround creating a fresh account on my Mac and launching studio and emulator inside of that allows it to run. So it is something in my original account settings that is causing this crash, and I still don't have a clue what (although there are no active startup items, launch daemons, caches, saved app state, etc that I can find, I have cleared them all).
Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.
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"