How to test android apps in a real device with Android Studio?
I have a Nexus 4 and own a Thinkpad L430 Windows 8.1
My errors: "Waiting for device. USB device not found"
I went to: Device Manager > View > Drop to "Acer Device" > Right click on Acer Composite ADB Interface > Update it
Afterward, Reboot/Restart your computer. Once it turned on Plug Your USB Device onto the computer.
Go to: Setting > Enable "Developer options" > Check the "USB debugging" option > Check "Allow mock locations" > Check "Verify apps over USB".
Swipe down from the drop down menu of your phone where it Shows the USB Connection Icon. Tap on USB Computer Connection > Select the Check box "Camera (PTP)"
Run your Android Studio App and it should work
To test an android apps in a real device with Android Studio, You must keep two things in mind
- You should enable USB debugging option on your android phone.
- You must have driver installed on your computer.
Now , let me tell you how you can enable USB debugging on your android phone:
- Go to Settings on your android phone
- Scroll down to the bottom and click on About phone
- On this menu also scroll down to the bottom, you should see something Build number
- Click on Build number 7 times
- Now your Developer Option enables, once you done click on back button and you should see a new option on your android screen i.e. Developer Options
- Click On Developer Options
- Scroll down until you see USB Debugging
- Go ahead and click the check box next to the USB debugging
- Now your USB Debugging option enables.
- Connect your android device to your computer with the help of USB connector.
Now let me tell you how you can download the driver on your Windows PC:
- Your windows machine need a software called driver to communicate with your phone.
- Go To OEM USB Driver Website to install your appropriate driver
- Scroll down and select the driver appropriate for your device. Check the screen shoot
- Once you download it , you have to unzip your file
- After Installing Google USB Driver, close SDK Manager window, Connect your phone or tablet through USB cable to your laptop or PC.
- Now click on My Computer (Windows 7) (or) This PC(Windows 8.1).Select Manage.
- Select Device Manager –> Portable Devices –> Your Device Name
- Right Click on Your Device Name and Select Browse My Computer For Driver Software.
- Point it to C:\Users\YourUserName\AppData\Local\Android\sdk\extras\google\usb_driver. Hit Next and Finish.
- Now Hit Run Button after selecting Your Project in Project Explorer in Android studio. Choose your device and press OK.
- First we have to enable the USB debugging mode. for that go to Settings -> Developer Options ->USB debugging in your phone checked it and allow it.
- After it open android studio, click on SDK manager , check mark the Google USB Driver and hit install package.
- After Installing Google USB Driver, close SDK Manager window, Connect your phone or tablet through USB cable to your laptop or PC.
- Now click on My Computer (Windows 7) (or) This PC(Windows 8.1).Select Manage.
- Select Device Manager –> Portable Devices –> Your Device Name
- Right Click on Your Device Name and Select Browse My Computer For Driver Software.
- Point it to C:\Users\YourUserName\AppData\Local\Android\sdk\extras\google\usb_driver. Hit Next and Finish.
- Now Hit Run Button after selecting Your Project in Project Explorer in Android studio. Choose your device and press OK.
I can run on my device at last, just I enabled the "USB debugging" and "Allow mock location" options from the Debug Menu of my device.