debugging android app via eclipse on bluestacks app player
Asked Answered
P

6

15

I have read a few articles that BlueStacks App Player can be used to debug android apps via Eclipse, instead of the default android emulator. Example article

But I think this refers to the Windows version, I was unable to get to it work on MacOS. Does anyone know how to debug using BlueStacks/eclipse on MAC?

Practicable answered 10/8, 2012 at 10:28 Comment(1)
To connect to BlueStacks 4, the following answer (of a related question) may be helpful.Atomy
H
31
adb connect localhost:10001 

should do the trick.

Heighttopaper answered 14/8, 2012 at 12:29 Comment(5)
didn't work for me, I got a new device but it appears offlineDaegal
Or: adb connect localhost:5555Ankeny
for me, just adb connect localhost default port 5555 worked.Adrienadriena
Running bluestacks 2 to debug now and localhost:5555 is working :)Reproachful
how about the bluestacks 4?Froma
T
15

Well, you can try another way:

1) First, open the DDMS via Window->Open Perspective->DDMS under Eclipse.

2) Then open BlueStacks App Player.(leave it opens)

3) After that switch back to Eclipse and you should notice there're two emulator under the Device tab. enter image description here

Then click Reset adb under the small triangle at the Device tab. enter image description here

After a few seconds, the another one emulator will disappear and you can proceed to the next step. enter image description here

4) Then return back through Window->Open Perspective->Java under Eclipse.

5) Select your project and right click on it, choose Debug As->Debug Configurations enter image description here

6) Under Android Application select your configuration or create a new one. On the Target tab choose Always prompt to pick deviceAfter this, select Apply then Debug. enter image description here

7) Then select BlueStacks emulator in the prompt window, and finally select OK.

Alternatively, you can also open the BlueStacks App Player before Eclipse using the above steps(with minor changes).

For more info, visit the below links.(However, in Chinese...)

http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746950.html http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746979.html

Hopefully this will help you.

Tare answered 16/2, 2013 at 12:48 Comment(1)
The hint of "resetting adb" did it for me. Thanks @Herks.Subjugate
B
5
C:\>cd Program Files (x86)\Android\android-sdk\platform-tools

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb connect 127.0.0.1:5555
connected to 127.0.0.1:5555

C:\Program Files (x86)\Android\android-sdk\platform-tools>
Baghdad answered 16/1, 2015 at 13:30 Comment(1)
this actually worked when... all of the above have failedOften
R
2

Run Bluestacks.

open Command Prompt in Windows.

Go to Platform-tools using following command.

cd C:\Users\<username>\AppData\Local\Android\sdk\platform-tools

then write:

adb devices

With SDK tools 27 and later! You get a list of devices detected by adb .. if BlueStacks-4 is installed you should see the device listed (emulator-555x).

Rosenberg answered 1/3, 2017 at 12:49 Comment(0)
C
0

For Mac users: localhost:5037 worked for me

Crespo answered 4/9, 2015 at 13:5 Comment(0)
P
0

BlueStacks bundles its own copy of adb, %PROGRAMFILES(x86)%\BlueStacks\HD-adb.exe. You can connect localhost with it, or any other command. BlueStacks 3 uses the default port 5555.

Pisistratus answered 9/12, 2017 at 20:48 Comment(1)
With BluStacks-4, I don't recommend using shipped adb ..instead make sure Android build in adb is up to date as it usually automatically detects Blustacks-4 (happens to be emulator-5554!)Krol

© 2022 - 2024 — McMap. All rights reserved.