Contents
Set Up Device for Development.; 5 minutes to read +3; In this article. This article explains how to setup an Android device and connect it to a computer so that the device may be used to run and debug Xamarin.Android applications. In the toolbar, select a device to debug your app on from the target device drop-down menu. If you don't have any devices configured, then you need to either connect a device via USB or create an AVD to use the Android Emulator. In the toolbar, click Debug. On your device, open the Settings app and select the About phone menu. Locate your device's Build number and tap it seven times. If you are running an older version of Android, you can enable USB debugging by going directly to Settings Developer options. Aug 29, 2012 - Android debugging on real device. Previously, you may created few “Android Virtual Devices (AVD)” for testing, and set “Deployment Target Selection Mode” to “Automatically“, however, this will caused the application failed to debug on your connected device and keep starting the AVD emulator.
Visual Studio 2017/2019 for Windows or Visual Studio for Mac. Mobile development with.NET workload for Visual Studio. If you followed along with the first post in this series you should be set up with at least one mobile device emulator, either iOS or Android, and the code for a mobile app.
Debug App in Real Android Device using USB Connection
After developing the React Native App it is always a good idea to test it on the real device because many times an app behaves differently in the emulator then the real device. This post will cover How to Run React Native App On Real Device in Windows/Linux/Mac.
Enable Debugging Over USB option
First of all, to run a debug app in your Android device you need to Enable Debugging over USB. To do this we have to do the following steps:
Go to Settings>About Phone
Find for the Build number or MIUI version and click it multiple time, until it shows you are a developer now
You will find a Developer Option direct in settings or in Additional Settings
After that Enable Developer Option and USB debugging
Attach your Real Device
After doing this you have to attach your Real Device with the computer using a USB cable and run the following command on terminal.
Run the App
Now run your app using
Known Issue
If you get a “bridge configuration isn’t available” error. Then use below command to solve
Here you have to replace
<device name>
with your device name. You got the name using adb devices
.Now re-run the app using
Debug Android Device On Mac
Screenshot of the app running in the real device
Android Phone Debug
Developer Menu
If you are doing some changes and want to see in your device you have to enable the Hot/Live Reloading which can be done form the
Developer Menu
. To open the Developer Menu in Real Device you just need to shack the device and it will open the Developer Menu popup for you.This is how you can run the React Native App on Real Device. In some cases, it becomes too hectic to manage cable all the time so there is another solution to Connect Your device with the development server using Wi-Fi.
This is how you can run React Native App on Real Device. If you have anything to share please comment below or contact us here.
Hope you liked it ?
Debug Android App On Device Mac Id
Answers
- edited July 2019To compile an ios app, you will need XCode running on a mac. If you don't own a mac, you can try using a cloud service like https://www.macincloud.com/Using a virtual machine should also be possible, but as far as i know there is no 'official' way to get a virtual machine with macos.Another way is to use https://appcenter.ms/ to build your app.
- Thanks @DirkWilhelm for your reply.App center sounds interesting. I have created an account to start exploring.How about debugging the app step by step? will it be possible using a cloud service?I have downloaded a macOS High Sierra 10.13 Virtual Box machine. I will give a try.RegardsJaime
- @jstuardo We don't recommend you to install VMs on a windows machine as it is in violation of Apple's licensing for Mac OS. Apple only allows VMs run on a real Mac device as the host.
Maybe you can try some cloud services which offer Mac OS but it still can't help you deploy the project on your real iPhone because the Mac is not by your side. And generally, these services are not free.
Moreover, App Center can only help you deploy your application to your iPhone. You cannot debug the codes line by line.
Unfortunately, if you want to develop iOS applications it's better to buy a Mac machine. - Read this article:
https://nicksnettravels.builttoroam.com/ios-dev-no-mac/
It might help you!