How to debug android app using moto g device in windows - android

please help me how to debug my android application in moto g dvice in windows platform.In my app am getting problem in running service in background.

Go to the settings of your device and check for Development Tools or Developer Options.If its not available then go to About Device there tap 7 times on Build Number you will see Developer Options in your Settings Menu.Click on it and enable Debugging option.
In your Eclipse,right click on the your project,select Run as>>Run Configurations>>Target>>select Always prompt Device.
Now Whenever you will run your application it will show options,select your device.
Hope it helps you .All the best :)

In addition to the above solution you need to do this to:
The Android development guide (http://developer.android.com/tools/device.html) says that USB drivers are required for debugging on a device connected by USB.
You can install the USB driver by going to https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481/action/auth
After installing the driver you can see the device in the Devices section of your IDE.

We can debug android application by following below steps
Enable USB debugging in developer options(if you are not able to see developer option then go to settings -> About Phone and press more than 5 times on build number then developer option will be enabled)
Install ADT plugin in eclipse
Connect your phone via USB cable
In eclipse change to DDMS perpective mode and there you can see Logcat panel and where we can live phone logging

Related

Huawei Phone not appearing in Android Studio on Windows 10

My Huawei P8 lite smartphone is not appearing in Android Studio on Windows 10. Although internal memory of mobile is appearing and file transfer is possible. Here's things I have tried.
1) Connected my phone to other laptops. It's working fine.
2) Connected other phones to my laptop. They are working fine.
3) Tried multiple data cables.
4) Updated all my drivers using Driver Booster.
5) Installed the latest version of Android Studio.
6) Updated my Windows.
7) Reset my Phone to Factory Defaults.
7) Manually installed ADB and USB drivers for Huawei.
8) Tried to update my USB driver in Device Manager but doesn't get updated that way.
My device is a Huawei Nova 2i phone and I had to face some difficulties to get it listed under available devices. USB debug option was getting disabled automatically and I had to follow below mentioned steps to fix it.
First connect the android device via usb cable and enable the "transfer files" option.
After that enable USB debug in developer option menu.
After the above configurations, my device was listed in target devices.
I suggest you download HiSuite, which is an official management tool.
After connecting device with PC, check "Transfer files" option.
you could enter this setting via swiping down notifications.
I had this problem with my Huawei P9. Then I realized that on device manager, my phone was using the incorrect driver. After I picked the MTP USB DRIVER, it worked.
If you can't connect Huawei phones to Android Studio, You can give it a try.
Follow these simple steps:
First you need to turn on Developer mode. To turn on developer mode go to Settings-> About phone -> click Build number 7 times .You will see a message "You are now a developer".
Next Steps: Find your Developer option. It Should be in System & update -> Developer Options
Turn on USB debugging
Select USB configuration -> Choose Media Transfer Protocol(MTP)
Then you might see a alert about "Allow USB debugging" Click OK.
You are good to go. If these steps doesn't help you, please change your cable.

Application Installation failed error INSTALL_CANCELLED_BY_USER coming in android

Application Installation failed error INSTALL_CANCELLED_BY_USER coming after applcation run on android studio via usb in any andoid phone?
error coming
error image link https://i.stack.imgur.com/4OWJR.png
If your app is already installed then uninstall it from your phone and try again.
Then try this:
TURN OFF & ON "Developer options".
ENABLE "USB DEBUGGING" again.
CLICK on "REVOKE USB DEBUGGING AUTHORIZATIONS".
Then try to run again and accept the popped-up msg to verify the access.
If that doesn't help,
Try this:
Step 1: Go to "Setting" → "Developer options" in System.
Step 2: TURN ON "Verify apps over USB" in Debugging section.
Step 3: Try "Run app" in Android Studio again!
If none of these techniques helped, you may check your phone usb driver.
I am using redme note3 as I update os to 6.0 Marshmellow,this error came frequently when I tried to install apk in my phone using android studio.
One problem occurs that i couldnt change install app using usb option in developer menu .So One solution I got for Xiomi phone
1.login in into your mi cloud
2.Then on install app using usb option in developer menu
3.Again run android studio.
4.It works
In your android phone go to
Settings
Developer options
In that, enable developer options, and then
Enable USB debugging and Install via USB.
That's all I had to do to run my project on a real device. And it worked for me.

Android phone is not detected in visual studio 2015

I am developing Xamarin forms app. I am not able to deploy app in nexus 6p( phone is not listed in device list ). Tried below steps, still phone is not detected.
I have installed Google USB Driver using Android SDK manager.
I have downloaded usb driver for nexus 6p and done 'Update driver software'
option in device manager under 'Portable devices' section. Device
gets displayed as 'Nexus 6p' within Portable devices section in
device manager and also seen as local drive( next to C: drive ).
Selected droid project as startup project.
But phone is not listed in visual studio device list. Any help?
Make sure the 'USB DEBUGGING' option in DEVELOPER OPTIONS remains checked on your connected Android Device.
I've lost lots of time because this item would uncheck itself for some reason between reboots/restarts and Enabling/Disabling the DEVELOPER OPTIONS.
If anyone else is still struggling with this in 2017, and your USB debugging is definitely on and it's still not appearing - I managed to fix this by turning developer options OFF then ON again from the device's settings. Also ensure that the USB option is set to:
Charging - Just charge this phone
I couldn't get any other method other than this to work. The device was then immediately detected by Visual Studio 2017 for me.
You ABD interface is not installed on your system, so first install the ABD driver from your local machine using (C:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver). 
And check your device is in developer mode.
If all the setting will be good then your visual studio automatically detect your device and you can start to debug your app on your device.
If you have installed VS2017 in parallel to VS2015, you also may have a look here Android devices not showed anymore in VS2015 after installing VS2017

android studio doesn't see USB connected device

Just to be clear, the device isn't locked or anything and it works perfectly for my friend who has the same android studio version. The problem isn't with detecting the usb device (by the computer), I can access the device's content just perfectly so it connects correctly to my computer but not to android studio.
When I try to run an application, the usb device doesn't show amongst the options.
Can someone please help me with this issue, knowing that my android studio is updated.
UPDATE:
the devices I used are: Samsung J2 and J3
Have you installed Universal USB Driver, if no then you will not see any device to connect. you can also install individual company device driver.
just try Universal USB Driver to connect all devices
Download from here Universal USB Driver
Open the Device Manager window from the control panel in your computer. In the Others/Unknown Devices tab you would see an unknown android device. Right click on it and update the driver and re-run android studio.
Make sure usb debugging is on in your device.
In Android Studio
Tools->Android->Enable ADB Integration
Enable ADB Integration
Then run app
Hope it will solve the problem
Enable your ADB in your Android
-> First go to Settings->Developer Options
-> Then On or Enable your ADB Mode
Just a Restart of Android Studio worked for me.
In my case it happened because of non-interaction in Android_Studio for long.
Else, Check with Run -> Edit Configurations -> Target.
I have the same problem and I use Samsung too.
I fixed it by installing the device driver from Samsung which you can download from Samsung's website
Note
You need to enable ADB mode(Like the second comment)
You need to set Target in Android Studio to > Open Select Deployment Target Dialog
to set Target : Run > Edit
Configurations > Targets > Open Select Deployment Target Dialog

Android Programming with eclipse

my android phone is not detecting in pc even though I installed all the necessary drivers and all are up to date, can anyone tell me steps to install device in windows 7. my android phone is HTC one x.(I am running my project in eclipse indigo)
Start SDK manager
Go To Extra
See whether Have you installed Google USB driver if not install this.
Restart Eclipse.
Again Connect Your device with the following steps.
from your device check that whether have you Started USB debugging mode on from
Developer Options
Checked USB debugging with USB. Device should be connected as MTP.
If Developer Option is not available on your device you can enable it by following steps
Go to Settings
About Phone
Tap Build number continue 7 to 8 times (Don't remember exact figure)
You will see the Toast "You are now developer"
Developer Options will be enable now.
Did you enable developer option on your device?
this link might help http://www.developer.com/ws/android/connecting-your-android-device-to-eclipse.html
If the aforementioned answers don't work, there is a workaround with connecting some Android phones where you should connect it 'as a camera' in order for the PC to recognize the device. (It won't detect them otherwise)
Download mobogenie3 setup and connect your device ,mobogenie3 will automatically download your device driver and install it .

Categories

Resources