richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
09/08/14 01:28 AM (9 years ago)

Eclipse can't detect my phone (device)

It did last Thurs or Friday (lost track) but then the program started playing up and I could not get it to acknowledge my phone on Saturday. Then it crashed completely and I am finally back to running a test app but the message which opens just after Eclipse launches is missing - the Allow/Deny (I believe it says something about a device). Anyone know how to 'force' Eclipse to read an external device? The pop-up box does not give that option - just asks if I want to run a emulator.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/08/14 01:58 AM (9 years ago)
There are a couple of things that may help: If your PC is running an emulator automatically then you can change this in Eclipse by - Right click your project > Run As > Run Configurations > Click the 'Target' Tab > Click 'Always Prompt to Select Device' > Run You don't need to repeat this process every time, just the first time. If your device is not being picked up on the list of available devices/emulators, then I have found this helps - With your Android device connected to your PC via USB, select the following on your DEVICE - Settings > Developer Options > USB Debugging (tick to on) I hope his helps.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 02:52 AM (9 years ago)
Yep. That brings up the Android Device Chooser box that I referred to as the pop-up box. The phone was listed in here the other day but not any more.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/08/14 02:57 AM (9 years ago)
And did you try part II? With your Android device connected to your PC via USB, select the following on your DEVICE - Settings > Developer Options > USB Debugging (tick to on)
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/08/14 03:00 AM (9 years ago)
I tend to do part II when the pop-up box is showing. That way you can see if Eclipse is picking up the device.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 03:01 AM (9 years ago)
Yes :) Actually using a Mac not PC. The device is new (Android 4.4) and I changed the Developer options when I got it last week. It was working fine until Saturday. Reading but not showing that a map was wanted but then Eclipse crashed and I have spent 2 days rebuilding but it is obviously still not working ok as the Allow/Deny option is not showing on launch.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/08/14 03:07 AM (9 years ago)
I have always found the connection temperamental. I try flipping USB ports and toggle the USB debugging OFF then ON. Most of the time the connection works but occasionally Eclipse thinks it is a human and is entitled to a bad day. V frustrating.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 03:14 AM (9 years ago)
Personally I have never come across a computer program like it ever. It is just plain useless. It won't search or automatically read anything. Can't wait for the new android program to be up and running. But in the meantime I have a IOS app that needs an android version as at least 50%, or more, of the magazine readers have an android phone. At least I can get the rest of the app done now but without being able to use my phone I can't do thorough checks and certainly can not sort out the map issues.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/08/14 03:39 AM (9 years ago)
If the connection to your android device just doesn't happen then I would recommend this as an alternative to AVD emulator in Eclipse. https://www.pcloudy.com/ Sign up and export your apk file (the file you would export to Google Play Store) and you can run it on a number of 'real' devices. I have been using pCloudy for a week or so and it appears to be good for a free service. The fair usage policy seems to equate to 10 mins per device per day. There are a number of devices to choose from although they are a bit limited with tablets. You may be able to use maps on these devices - I haven't tried yet. You will have to export a new apk each time you make a change to your project to see the effect of that change. Important that after you have exported your apk to your Mac from Eclipse that you rename it with a .apk file extension (it has no file extension as default) for it to work on pcloudy. Good luck.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 03:46 AM (9 years ago)
Ok. Thanks. I will give it a try and let you know if the maps work. May be useful to you (and anyone else reading) in the future.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/08/14 03:50 AM (9 years ago)
Ironically, I've just had the same Eclipse/device issue as you. Fixed it by doing the old laptop OFF then ON trick.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 03:53 AM (9 years ago)
As I said. Eclipse - you just can't rely on it. Sometimes you are lucky but most of the time you just want to give up.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
09/08/14 04:49 AM (9 years ago)
>Eclipse - you just can't rely on it I develop in Eclipse all day long and I can rely on it, however, I am on Windows 7. With Buzztouch, you can compile an app with all the plugins that you have, regardless of whether you use them in the app or not. Once the app is imported into Eclipse and passes few simple syntactical checks, practically all of the development is on the server, and Eclipse just disappears from sight. I use it, but it is not making problems. Of course, if you are like me and do actual programming in Java within Eclipse, things may look different. But it is still helpful, especially with its Ctrl - Space shortcut, to offer autocomplete. You are not bound to using Eclipse at all, you can do all of it manually, from command line. However, once you start apps development from command line, you quickly start loving Eclipse, it is a huge time saver compared to command line approach. Just like you, I am in situation that I cannot test the app directly on the device, as my tablet has no drivers. So, I use FileZilla to send the apk file to a server of mine; the apk on the server has its own URL address. I then send an email to the gmail address I use on the device and that email contains only the address of the app. Gmail will put such an email into the spam folder so I search it there right from the start. Once I find that email, I just tap the address of the app on the server and it starts downloading. When it is downloaded, I tap on it and it installs the app, possibly overwriting the existing app of the same name. Then I just run the app and that's it. There is an app for that too, it is called AirDroid and there are similar apps too. You may want to have a look at it, I don't like it because it send my app to their servers, and I have no idea what are they doing with it. (What I described above is essentially my private AirDroid service.) If your computer sees the Android device as an external disk, then you can just make a file transfer to it and send the apk file in that way. Once it is on the device, you just have to find it and install the app; I use Astro file manager but any other will do to. Hope this helps.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
09/08/14 05:01 AM (9 years ago)
The issue likely is not with Eclipse, but with adb. This happens to me a lot on my computer. ADB is so finicky for me that often the emulators don't get recognized either. The solution is to restart the ADB "server". Not sure how to do it on a Windows computer, but on OSX you open up Terminal, navigate to your Android SDK folder, and go to the platform-tools folder in that. Then you type: ./adb kill-server ./adb start-server
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 05:07 AM (9 years ago)
When I type in ./adb kill-server I am getting -bash: ./adb: No such file or directory
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
09/08/14 05:14 AM (9 years ago)
do you see adb in the platform-tools directory? If not, you may need to do a search on your computer for files with the name "adb".
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 05:29 AM (9 years ago)
There are 13 adb.xml files (I am guessing I don't need them all). I have double clicked one and after the Dreamweaver welcome scree an adobe dreamweaver CS3 box opens saying adb.xml is a locked file and can be viewed but not changed. What would you like to do with this file? The options are Cancel or View.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
09/08/14 05:42 AM (9 years ago)
No, not the .xml files. It will just be "adb" (no extension), listed as an application. If you're on Windows, it's probably "adb.com" or "adb.exe". If it's not on your computer, then you'll likely need to reinstall the Android SDK.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
09/08/14 05:48 AM (9 years ago)
Ah. Right. Found it. Yes, it is in platform-tools of the SDK folder. Using a Mac btw.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/09/14 06:14 PM (9 years ago)
This does not encourage me to give Android-Eclipse-ADB another try! I wonder if the Eclipse lovers have experienced the goodness of Xcode? Oh well, the Eclipse lovers must deal with the hand they have been given. My sorrow goes to them. -- Niraj
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.