Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

Andriod Studio get emulator-arm.exe has stopped working error.

I am new to Andriod Studio and am trying to get it set up and the first Hello World Project to run. I get the emulator.arm.exe has stopped working error message when I try to run the basic Hello World Project. I did and search and lowered the resolution to 480 x 400 and the RAM to 343. I am using the Andriod442 emulator. If I start the emulator through the AVD manager it seems to start up okay. When I try to run the project with it open, it seems to run and I see the Hello World message and then it crashes. If I try to run the project without opening the emulator first, it crashes while running the program and I do not see the Hello World message. Here is a message from the program, not sure if it is relevant or not.

aiting for device. C:\AndriodStudio\android-studio\sdk\tools\emulator.exe -avd Andriod442 -netspeed full -netdelay none

Device connected: emulator-5554 Device Andriod442 [emulator-5554] is online, waiting for processes to start up.. Device Andriod442 [emulator-5554] is online, waiting for processes to start up.. Device Andriod442 [emulator-5554] is online, waiting for processes to start up.. Device Andriod442 [emulator-5554] is online, waiting for processes to start up.. Device Andriod442 [emulator-5554] is online, waiting for processes to start up.. Device Andriod442 [emulator-5554] is online, waiting for processes to start up.. Device is ready: Andriod442 [emulator-5554] Target device: Andriod442 [emulator-5554] Uploading file local path: C:\Users\Dennis.ALPHALEASINGCOM\AndroidStudioProjects\MyApplication\app\build\outputs\apk\app-debug.apk remote path: /data/local/tmp/com.alphaleasing.myapplication Installing com.alphaleasing.myapplication DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.alphaleasing.myapplication" Device disconnected: emulator-5554 pkg: /data/local/tmp/com.alphaleasing.myapplication

Launching application: com.alphaleasing.myapplication/com.alphaleasing.myapplication.MyActivity. DEVICE SHELL COMMAND: am start -n "com.alphaleasing.myapplication/com.alphaleasing.myapplication.MyActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Error: Adb refused a command

1 Answer

Ryan Ruscett
Ryan Ruscett
23,307 Points

Hello,

What I would do is restart the adb.exe. You can do this from task manager or a quick google will easily tell you. Once you kill it, if you have eclipse or android studio up. It should come up again automatically. The emulator is up and running, it's looking for connections. Although, when you connect. It's refusing it. This is likely because some other program is using it. Again, if you are on windows. You can right click on the avd and say open folder location. If it opens up to anywhere other than android tools. Another program is hogging it. If it's a service, you can go to services and just stop it. Then try using the emulator.

Let me know if this helps. When you start the process, does anything get written to logcat?