Running react native app in Android Virtual Device on Windows - android

I'm near frustration. I'm trying to get my react native app to run for hours. all tutorials I find, are skipping the part of Android Virtual devices not starting properly.
I have my react package via node and expo.
HOME and JAVA variables are set. VT-X is enabled. Android Studio is up to date. Whenever I start the Android Virtual Device (set up as Pixel 2) the Android device keeps presenting the Animated Google Logo, but doesn't start.
When I try to start the Android Device via Expo localhost I get an error about USB debugging, which I don't want.
Couldn't start project on Android: Error running adb: No Android
device found. Please connect a device and follow the instructions here
to enable USB debugging:
https://developer.android.com/studio/run/device.html#developer-device-options.
If you are using Genymotion go to Settings -> ADB, select "Use custom
Android SDK tools", and point it at your Android SDK directory.

Error occurred because the current computer and emulator are not connected.
Did you set up the Genymotion as described in the error?
If you hadn't, go to Settings -> ADB, select "Use custom Android SDK tools" ->
and point it at your Android SDK directory.
Download the SDK from here: http://developer.android.com/sdk/ to C:\android-sdk\
C:\android-sdk\
Run emulator, click developer options, enable USB debugging and enable Wi-Fi to Cellular.
Run the Genymotion Shell and type devices list to find the IP address of the device.
Open the terminal and enter adb connect deviceIp:5555. Make sure the connection to adb device is correct. Enter adb usb and adb tcpip 5555.
Android adb documentation

Related

I can't run my Android Studio project on a real Android device

When I tried to run my Android Studio project on my Android phone using a USB cable, Android Studio shows this message:
Unable to create Debug Bridge: Unable to start adb server: Unable to
detect adb version, exit value: 0xc000007b
In order to use physical device, follow these steps :
Open settings and go to About phone -> Go to Build number and tap it until a toast
appears as you are in developer mode.
Go to developer mode and enable USB Debugging.
Connect your phone to pc via USB cable.
Wait for your device to be appear next to run button in android studio.
If it appears, simply run otherwise in your android device choose use USB to :
Transfer file or ptp.

Not able to connect Nokia 6.1 Plus to Android Studio for running apps

I am using Nokia 6.1 Plus. I am trying to connect it to Android Studio for debugging apps. But I am not able to connect. I have enabled Developer Options, in that also enabled USB debugging. Selected default USB debugging to File Transfer. But unable to find the device in Android Studio.
**I am using Linux. Anybody help me to find the solution.
You need adb driver for that.do below steps(Windows)
Download and install this(Universal
adb driver ):https://adb.clockworkmod.com/
Goto My Computer Device Manager ,find your android device=>update driver=>select adb interface and press ok.
by doing this it will be resolved.
For Linux:follow this Link for adb setup:
Linux Adb

Android Studio to Bluestacks Connection Error

I am new to android development and was trying to use bluestacks to test my apps (as my pc won't run the emulator fast) but the bluestacks emulator is not being detected by android studio.
I started bluestacks and then ran my app. On the choose device dialog it doesn't show bluestacks.
I looked up in device monitor, but bluestacks wasn't detected there.
I also tried using adb kill-server, adb start-server, adb connect 127.0.0.1
but that didn't work as well. It says "connection could not be made as the target machine actively refused it".
All the solutions given in the other related stackoverflow post don't work. Android studio won't recognize bluestacks.
Please Help !!
Try in command prompt "netstat -anb" with administration privileges. Check if there is 127.0.0.1 5555 Estebalished.
If everything is OK then temporary disable firewall and type"adb connect 127.0.0.1:5555" should work.
i too have also gotten the error "connection could not be made as the target machine actively refused it" recently (when i tried to connect to adb using command prompt)
Trying with -> adb connect localhost:5555 or adb connect 127.0.0.1:5555 would not work. You need to identify your bluestack device ip address. You can identify the ip address using the preferences in your bluestack emulator setting. (where you enabled ADB in bluestack).
I did the following to resolve the error you had encountered and successfully connect Android studio to Bluestack. please try the following steps. (I am using windows 10, Android Studio 4.0.1, Bluestacks 4.200.)
find your android studio sdk platform tool folder. For me its is
custom installed in my D drive. for example->
D:\AppData\Local\Android\Sdk\platform-tools
right click on adb.exe
and run as administrator. (click on yes if a pop up ask if you would
like to make changes to your devices. After that you would only see
another pop up that suddenly disappear.)
open Bluestacks. Run your selected emulator (samsung/pixel etc). Ensure that
you have enable "Enable Android Debug Bridge (ADB) in the emulator
preferences.
open command prompt. cd to your platform tools folder path.
enter the following command->adb connect xxxxxxxxxxx where xxxxxx is your
device localhost ip. (see attach pic. My device ip is
127.0.0.1:xxxxx hence my command is ->adb connect 127.0.0.1:xxxxx
continue with the following command->adb devices you would see your bluestack
emulator device. same ip listed.
open your android studio. You would be able to see your bluestack emulator
[
i don't know if you fixed the issue or not but it's pretty simple to use bluestacks, if you see this screen when you open it like this all you have to do is run the app in android. it happens where android doesn't detect it because it wont see it as a device you either wait or try to get that screen (that sort of refreshs)
Just Need to do this!
Go to the SDK folder that you have got in your computer,then open the "platform-tools" folder,then open the "adb.exe" as administrator.
then try the BlueStack emulator.
if u got problem to connect with blue stack through android studio then follow following steps
in run(windows+R) put '%localappdata%\Android\Sdk\platform-tools' and check adb.exe is working correctly or not
If not then download file from
https://www.microsoft.com/en-us/download/confirmation.aspx?id=49093 which is
Update for Windows 7 for x64-based Systems (KB2999226) (related OS)
and install it.
allow adb.exe as exception in your virus scan software don't treat this exe as malware.
start your blue stack emulator.
go in setting of blue stack emulator go in preferences click checkbox 'Enable Android Debug Bridge'.
go to this location %localappdata%\Android\Sdk\platform-tools and run cmd through this location.
put command 'adb connect localhost:5555' press enter in command prompt.
start android studio then run project through play button popup will come with virtual device list, it will show your emulator's device.
...happy coding

adb "waiting for device" after installing usb drivers

I am new to Android development and I am trying to get a test app onto my phone. My phone is an LG G3, and I am developing on Windows 8. Following the official tutorial,I have installed the android sdk, and can run ant debug. However, when I run adb install bin/MyFirstApp-debug.apk it just says
error: device not found
error: device not found
error: device not found
- waiting for device -
I went to the OEM USB Drivers page, got the usb driver for my model, installed it through the installer provided by LG, and restarted my computer. Still getting the message.
When I try to update the drivers through the Windows 8 Device Manager, it says the drivers are up to date. I have also tried different combinations of turning both developer mode and usb debuggin on and off.
I have also tried setting up my Macbook as a development environment, but I still get the same error at this step, despite the documentation saying "If you're developing on Mac OS X, it just works. Skip this step." in reference to installing USB drivers.
Does your device show up in Windows Explorer? If not, this works in Windows 7. Try:
Start -> Computer (right click) -> Manage ->Device Manager -> Android Device -> Android Composite ADB Interface (Right click) -> Update Device Driver -> Browse My Computer for Driver Software -> Let me pick from list of device drivers on my computer
Found the answer in the second response here. Needed to specifically set the USB connection to Internet

Eclipse won't recognize my device

I searched trough many questions and couldn't find an answer that fix my problem.
I'm new on creating Android projects and I'm still getting familiarized with the eclipse platform.
To the point, when I run my project I get this error
No compatible targets were found. Do you wish to add new Android Virtual Device?
I changed the AndroidManifest.xml from targetSdkVersion="18" to "15" (Which is my device level, Android version 4.0.4, correct me if I'm wrong)
Then I clicked on Run Configuration and switched from "Launch on all compatible devices/AVD's" to "Always prompt to pick device", and still couldn't get the project to work.
When I reverted the Run Configuration I get this output everytime I try to run the project
[2013-12-15 21:27:28 - MyFirstApp] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
What's the meaning of both messages? How can I make it work?
Some details:
Android Version: 4.0.4
OS: Windows XP
Samsung Galaxy S DUOS
Please follow the steps
Step 1
Check if the device driver is installed successfully. If not, download the drivers and plug the device again.
Try this link to download the driver software - http://samsung-kies.en.softonic.com/
Step 2
Click Start-> Run-> CMD. (Go to command prompt)
Navigate to the android SDK platform tools path.
Type adb devices
Now you should get the device listed and a tag "device" next to the device ID
Step 3
If you get "no devices found", type adb kill-server
Type adb start-server
Now type adb devices.
Now you are good to start testing your applications on device.
You have to have Samsung Kies installed on your computer so you can have drivers for your device, also, from eclipse:
window -> show view -> devices
if you don't see your device here, this means either your ADB is not running, or your device is not recognized by your computer
also verify you have debug mode enabled in your device
Do you have the usb debug driver for you device installed? This is the driver that allows your device to "comunicate"with eclipse in order to debug

Categories

Resources