Trying to debug apps from eclipse on android - android

I am developing apps for android and I bought an bq Maxwell 2 Lite, and I wanted to test them in the device, but i can't seem to do it... can somebody help me with that?
The android version on the device is 4.1.1 and I have enabled debugging throw USB.
Thank you all for your time and thanks for all the help
Carlos Morgado

So to test with any device you need
Install the driver for the device on your OS.
Enable USB debugging on your device.
Plug-in the device through an USB.
Run the app through the IDE and select the configured device to run the application
This should help you get started.

For using USB debugging in eclipse, make sure that you have all the drivers installed. Open sdk manager, under extras you can see Google USB drivers, make sure that this is downloaded.
If after this also it didn't work, go to device management if you are using windows and find your device. Right click on your device and update device drivers, update from my computer and give this folder sdk folder\sdk\extras\google\usb_driver. Set platform-tools folder in your path variables and run these commands:
adb kill-server
adb start-server
You can see list of attached devices using this command:
adb devices

Related

Unrecognizable device on Android

I want to run my code on the phone. But Android does not recognize my device. I also did the connection assistant.
But the following error is given. please guide me.
Needed informations
Is ADB installed with Android Studio, or have you got external tool?
Is there a generic Android USB Device driver installed? It's provided with Android Studio, and should be obtained with SDK Tools.
Possible solution
If even AVD cannot be recognized, it could be fault of built-in ADB server. I would recommend installing ADB as an external program, e.g. from here (ClockworkMod page).
After installation, reboot PC and plug your phone in. If phone is visible, check for availability via adb devices command from CMD/terminal. Don't launch Android Studio yet, as it has its own instance of ADB server and you wouldn't be able to launch second one from console.
If phone is visible, use adb kill-server command to finish the console instance, and launch Android Studio. Everything should be detected, if not - you really should submit that bug...
If phone is not visible all the time after issuing adb devices, there is a chance that not all drivers are installed. Check ASUS for drivers, if they were installed automatically - install them manually.
Hope it will help!
Have a look at PdaNet+
Install both the desktop client and the corresponding android application from the google play store. Once you plug in your device it will prompt you that your device has been connected and adb should recognise it.

My phone cannot be detected in eclipse to test run

Before asking my question, I have looked through a few threads that share the same problem as me and have tried all the given solution with no success. I am from Malaysia.
I cannot get my device to be detected to test my app on my phone. I have checked both the "Unknown sources" and "USB debugging" settings in my phone. I am using eclipse. But if I create a random virtual device, my app is able to run there.
Okay so I am using a Motorola Atrix 2. And I'm using Windows 8 Pro 64 bit
I have downloaded android SDK bundle from here : http://www.motorola.com/sites/motodev/us-en/motodev_lp.html
I have also tried downloading the latest driver with no success. I have also added this line in the manifest android:debuggable="true"
I have tried both as a mass storage device and a media transferring device.
I would appreciate any help a lot because as of now, I cannot progress further into developing an android app and that saddens me. :(
I have attached a picture of which my android phone should be detected in the window, but as you can see, none.
https://pbs.twimg.com/media/BJu1XSgCYAEGCUd.jpg:large
go to /your-android-sdk-directory/platform-tools using command prompt.
type
adb kill-server
adb start-server
adb devices
n see whether ur device is detected now or not...
Note: if you're using a Linux machine then put ./ before adb
Install proper drivers for your adb devices, from Android-SDK archive or Motorola site.
If you are on Windows machine, go to the device manager find your device, and select folder with drivers for it.
Open you windows os's explorer, have a look at the process, if there two or more process hold your adb, try to exits the process
Check that the android:minSdkVersion is lower or equal to the Version running on the phone. If it is higher it wont show on "Android Device Chooser"
Install and run programs/drivers with admin rights.
Have you installed Motorola Device Manager?
When debugging Samsung and HTC devices I got it to work by installing that kind of software (for syncing the devices to the computer).
Download from the following: ABD Universal Driver
and install it. Make sure you have your device plugged in before installing and make sure you are on USB debug mode on the phone settings.

How to connect the device to Eclipse?

I am not able to resolve this simple issue.
I am trying to connect my device to Eclipse via USB cable.
On my PC, I have installed Eclipse and the Android SDK and running the program on the emulator is working fine.
I have downloaded and installed Samsung Kies on my PC. It shows my device if connected via USB to the PC.
But I dont know how to connect the device with the emulator.
Connect means, I want to run the Eclipse code on my device instead of emulator. I am using Samsung Galaxy Ace GT-S5830i. Please help me out to resolve this issue.
Comment is lack of formatting so i add an answer.
Check if your computer had your phone driver. I assume that your use Windows. Open Device Manager
At a command prompt, in the Start Search box, or in the Run box, type the following command: mmc devmgmt.msc
. Other ways : check link
If you find your phone name or ADB Interface so you got driver. Try to restart DDMS or restart your Eclipse.
If you don't find your device or see something Other device with yellow question mark so try to install driver by browsing on your phone to Settings - Developer Options - Enable developer option - Enable USB debugging - Plug your phone to computer. Windows will ask you to install driver.
3, Update Google USB driver in Android SDK Manager (in Eclipse) or search Samsung Galaxy Ace GT-S5830i driver
4.Some weird case i got on some device.
Nexus S: disable Developer option. Restart phone. Enable again. Windows ask to install driver or you will see it in Eclipse.
HTC phone or Samsung : change Connectivity Option on phone to Charge only (Swipe status bar. Check notifications displayed). Some phone set it to some kind of Sync data so Windows can not recognize device.
I think your emulator is in Automatic. You can change that to Manual.
Try this,
Step 1
Go to Run Configuration
You can see three Columns Android,Target and Common.
Step2
Select the Target
Step 3
Choose Always prompt to pick device.Click Ok
Step 4
Now run your project you should see the emulator and your device. Select your device and click ok.
Hope it helps.
Source.
Troubleshooting
This all sounds very straightforward, but there are countless quirks and hard-to-diagnose problems that can make connecting a device much more difficult than it sounds. In this section, we'll run through a checklist of things to try when your device isn't registering.
Check that USB Debugging is enabled. This setting can inadvertently (and perhaps even automatically) change when you plug/unplug your device from your machine, or when you reboot your phone.
Check your device while it's connected to your machine. Is it asking you to choose between different modes? Some phones have a 'charge only' mode that can prevent Eclipse from recognizing the device.
Choose a connection type
Make sure you don't have an Android Virtual Device running in the background.
Could there be a problem with the USB cable? If you have a spare cable to hand, plug it in to rule out a fault with the cable itself.
Double-check you're running the correct driver. Even if you are, some devices have all the required software pre-installed (for example, HTC Sync) and downloading drivers from another location can muddy the waters. If this might be the case with your device, try uninstalling the driver from your machine and reinstalling the software from your device's memory.
Does the driver require supporting software? Samsung Kies on Windows requires .Net Framework 3.5 SP1 or above, for example. This is usually installed along with the driver, but there's no guarantee.
Running the Android Debug Monitor tool (monitor.bat) has been known to kickstart Eclipse into recognizing a new device. Connect your device, locate monitor.bat (android-sdks/tools/monitor.bat) and double-click to open. This will open the Android Debug Monitor, a stand-alone debugging tool that lists connected devices.
Android Debug Monitor
A running adb.exe process can interfere with the connection. Close Eclipse, and open the Task Manager by pressing CTRL, Shift and Esc. Find the adb.exe process and kill it. Launch Eclipse and try again.
Check that your 'Project Build Target' is compatible with the Android version on your device. You can check what version of Android your device is running by opening 'Settings' and selecting 'About Phone,' followed by the 'Software information' option if available. If you need a reminder of your project's build target, ensure the project is selected in Eclipse's 'Package Explorer,' open the 'Project' menu and select 'Properties.' If the 'Android' tab isn't selected by default, open it and the Build Target will be displayed.
Have you enabled USB debugging in your device?? You can find it in your device
Settings -> Developer Options -> USB Debugging.
The android app you have created will be a .apk file, generated by eclipse, during a successful Run. Find the .apk file from the eclipse project explorer or by tracing your workspace. Copy the .apk file to your memory card (via USB or a card reader) and install it.
You should also enable the "Unknown Sources" option under "Security" of your Android device.
If you have required options enabled on your phone (USB Debugging and Unknown Sources) you can try do this. On your computer open command console. Using cd navigate to your android sdk installation folder. Go to platform-tools. You should have there adb file. Run this
./adb kill-server
and then
./adb start-server
Then check plugged devices
./adb devices
First, you are not connecting device with emulator. What you want is eclipse to identify your device and use it for development.
Everything about using devices for android development is given in official documentation.
You have to put the phone in 'debug' mode - I don't have the instructions handy (but you can search here or on the android site for the info you need).
Also check for THIS.
Try right clicking the project -->Run As --> Run Configurations then select target and choose always prompt
On your device turn on debug mode
Now try running project
I am assuming you don't mean connecting the device with the emulator but connecting the device to your computer so you can debug it and run applications directly from Eclipse to the device. In which case KIES by Samsung will not help you at all. What you need is the Android USB Drivers provided in the Extras tab in SDK. Sometimes the installation will bug up because you didn't run SDK manager as an administrator so make sure you do that. When all of this is done make sure your device is unconnected to your computer and then reconnect it after the drivers are installed. You should be prompted with a new device installation wizard which you must accept. Additionally, you should have debugging enabled on your device, and as an extra step you can setup launching as a manual configuration but it is not needed.
To enable device debugging
Settings -> Developer Options -> USB Debugging.
For more information visit here
BTW : If the Google USB Drivers don't work you might need to install the specific Samsung drivers which are located here
Goto -> Setting -> Application -> Development -> USB Debugging
Enable it and try.
I know this is a little old, but I was having the same issue. I tried all the options of setting usb debugging (off), disconnecting, restarting phone, usb debugging (on), connecting the phone and it just wouldn't connect.
I ended up installing the latest version of Kies on my machine and added the Unified option at the end of the installer and I then the phone would connect. (Not sure i needed the unified option) but it worked for me.
I tried all the above but it didn't helped me. I did couple of things additionally
Since my mobile device is Android, I unchecked Unified option from Kies installer. This is the crucial thing that helped me solve my problem
I restarted my mobile phone.

Adb can't find my device

I was developing an android application from Eclipse, connecting my Acer ICONIATAB A 500, with Android 3.0.1. And I did not have any problem.
Now I'm trying to developing the same application on Acer ICONIATAB A 501, with Android 3.2
and my ADB can't find the new device, while Windows can find it! I set in my tablet Debug USB option active, and I installed the appropriate driver on Windows.
I installed even the last Google USB driver (Rev. 7)
I tried to list the device find form adb with command
adb devices
from command line, but List of devices attached is empty.
What can i do?
execute these line
adb kill-server
adb start-server
if it is mobile device check that in settings, developers options , debugging mode is checked or not
You need to install LGUnitedMobileDriver package from the LG website, even though Windows 7 automatically installed USB drivers for the phone.
Try to update your Android-SDK on your computer (in Eclipse or whatever IDE you are using), this helped me solve a similar Problem.

Android SDK DDMS in Eclipse not recognizing my Android Phone

I just purchased a ZTE Cricket X500 running 2.3.4 for the purpose of testing my Android apps on. When I start the DDMS in the Eclipse Android SDK the device is not listed. The phone is in debug mode, Unknown Sources is enabled, and as far as I can tell the neccesary USB drivers have been installed. Furthermore I have a "Android Dev Phone 1" and the DDMS is able to recognizing that. My computer is running Windows 7. Any theories as to what might be going on?
try these commands:
adb kill-server
adb start-server
for some reason, this works for if the device isn't listed
I think it is because of your drivers, So install drivers for your device in your computer, then try to use it in dubug mode. so for that you have to put your device in debug-gable mode.
Hope this will help you.
Have you looked here and done everything required?
As the link says, if you are on a Windows machine or Linux machine, you need to tell your system to recognize the vendor ID for your phone. Hopefully this helps.

Categories

Resources