Crash on sleep after running eclipse with ADT plugin installed - android

I've been having issues for a while where my Windows 7 machine would blue-screen when I tried to put it to sleep. I ignored the issue and just avoided using sleep until I recently happened to figure out that the crash occurred only after I'd run Eclipse. By comparing with a fresh install and adding plugins individually, I was able to source the problem to the Android Development Tools plugin for Eclipse. If I run a fresh version of Eclipse with the Android plugin installed, then the next time I tell the machine to sleep it shows a blue screen instead. If I specifically remove the com.android.ide.eclipse.ddms_22.6.2.v201403212031-1085508.jar from the plugins directory, then the crash does not occur, although I of course lose the functionality of the plugin.
Now I'm at a loss. I can tell whats causing the problem but I have no idea how I can fix it if I want to continue to use the Android plugins in Eclipse. Does anyone have any advice on how to further troubleshoot this?
Edit: After reinstalling drivers, the crash appears to occur under the following specific condition: The old Motorola Droid II that I use as a backup testing device has USB drivers installed and is plugged in, and adb.exe is running (either while eclipse is running or after it has closed). Knowing that, I have the easy workarounds of unplugging the device or stopping the adb.exe process before putting the computer to sleep. Still no idea why there's a crash under those conditions, though.
Edit2: Since this hasn't been touched in a while, worth noting that it's an adb issue and not an eclipse issue (it occurs using Android Studio as well), so I've updated tags accordingly.

Related

Xamarin Debugging on Android Device not working

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

Cannot locate connected device in Processing

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.

Android MacOS dev: emulator64-crash-service quit unexpectedly. At wit's end

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).

Phone restart [Android - App Installation]

I've met an issue related with almost every phone but not Nexus.
During installation of app to phone by usb - Android Studio - phone restarts itself and app is not installing finally - I have to run app one more time by Android Studio to install it.
This doesn't happen all the time, but randomly, it's annoying and time wasting.
Honestly I don't know with what it's truly related problem, phones or Android Studio.
Have you met this problem?
Do you know any solutions?
Thanks.
There are three cases:
There is a problem in the app source code: You should Build APK and install it in the phone. Maybe its required to install the app for several times. if phone restarted again, check the source code carefully.
There is a problem in usb cable: Maybe there is a short circuit in the cable or a glitch in it. Change cable and try again.
There is a problem in android studio: uninstall android studio and try to install it again.

Why does eclipse hang when installing an apk to an android emulator?

I've looked at tons of similar questions on here but all of them either had a different issue (installing the .apk actually failed) or the solutions which worked for them have not worked for me, so I apologize if this question seems like a repost.
The issue I am having is that when I try to run an android application on an emulator in eclipse the apk never gets installed. The emulator itself works fine (all the default apps function properly, settings are correct, etc.) but the app I am trying to test is never installed onto the "phone." It never shows up in the app list or launches, and I never get a confirmation that installation completed. (The run configuration is set to launch the app)
Here is the relevant console output, with some names changed:
[2011-10-19 10:54:45 - dining-android] Android Launch!
[2011-10-19 10:54:45 - dining-android] adb is running normally.
[2011-10-19 10:54:45 - dining-android] Performing <src path>.Main activity launch
[2011-10-19 10:54:45 - dining-android] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD '1.5test'
[2011-10-19 10:54:45 - dining-android] Uploading <appname>.apk onto device 'emulator-5554'
[2011-10-19 10:54:59 - dining-android] Installing <appname>.apk...
It doesn't seem to make a difference whether I start the emulator manually and then try to run the app or if I run the app and let it start the emulator automatically, it will never go past this step. I left it running for about 8 hours (overnight) and nothing at all changed. The app is designated for the same version of android as the emulator runs, and everything looks correct in the settings of the emulator and eclipse as far as I can tell, except it never completes the installation of the app.
Does anyone know why this would happen? I've tried restarting adb, using different versions of the emulator and/or app, changing the default run configuration, and various other solutions I've come across on the internet which didn't seem to have any effect whatsoever. I'd really appreciate some help on this if anyone has run into something similar.
EDIT: I just tried using the "adb install" command in the command line on the .apk of the app while the emulator was running and it was also unsuccessful. I don't know whether this is related or another issue entirely.
EDIT2: Command line install using "adb install" functions properly. However, eclipse still can't manage to install the app. Anyone know what might cause this?
I had the same issue when I tried to run my android app in a device. Eclipse went to 100% of CPU usage and it did not respond anymore. I had to kill Java processes to close eclipse every time that I ran the app. As part of the workaround I removed android plugins from eclipse, updated my android binaries in my box and installing a fresh new eclipse . I killed adb server and restarted it several times. After all of that I had the same issue.
The solution came when I tried with another phone and voilĂ ... magically the problem was gone. I had been trying with a Samsung SIII(GTI9300 - OS 4.1.2) there was some issue with that phone because when I tried with a different phone Razor-I(XT890 - OS 4.0.4) . I used other SIII(GTI9300 - OS 4.1.2) and it worked too. Maybe the solution is not the best but was effective for me. If you have no chances to change the phone I recommend you to dig out in the configs of your phone with android binaries outside of eclipse.
I hope this helps.
I had this problem before, I don't remember how I resolved it though (it was a while ago).
I personally suggest reinstalling the sdk and the ADT plugin, and make sure you're following the steps on the developer website. I'm not sure what signing the package has to do with eclipse not installing it on your phone or the emulator -- it only needs to be signed if you're going to have it up on the market (or if you're trying to install it on non-developer mode phones).
Another thing you could try is building a new android project (like a simple hello world app) and trying to install that. If it doesn't install then you're having an issue with eclipse and/or the sdk.
Also you could just completely wipe out eclipse and the sdk, and start from scratch. (Again, follow the directions on the android developer website...)
http://developer.android.com/sdk/eclipse-adt.html
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1
Good luck
I was fighting with same issue today.
And thanks to eplewis89, he was suggesting right things.
For me the problem was in ADT. I've updated my ASDK to highest version and ADT started to yell about it's compability and suggested to update itself too. But I chose only some parts that I thought will be enough to develop. Really this mistake cost me half of a day.
Help -> Check for Updates and update of all ADT stuff solved the problem.
I also had this issue. I tried everything I could find on the net and none of it worked for me.
It's not the solution you want to hear, but what worked for me was abandoning my Eclipse Helios install and laying down a fresh Eclipse Indigo install and then installing Android Dev Tools.
I ran into this after a crash and there was an emulator process that was still running in the background.
The solution for me was to kill adb (using ps -ef | grep adb and kill) and any running emulators (using ps -ef | grep avd and kill). Then I restarted adb:
cd /path/to/android-sdk-linux/platform-tools
./adb start-server
Go to Android\android-sdk\platform-tools in cmd and type command logcat
Then try to install the apk on the emulator again and paste the log here

Categories

Resources