0

I'm trying to setup an Android development environment without Eclipse using this guide.

I've managed to install the SDK and create a new project, but I'm getting an error while trying ant debug install to run the app for the first time:

install:
     [echo] Installing /Users/x/work/private/HelloAndroid/bin/HelloAndroid-debug.apk onto default emulator or device...
     [exec] error: device not found

And when I try adb devices I get an empty list. Same happens on android list avd, and the .android/avd directory contains nothing.

Do I need to manually install emulators? I thought the SDK included at least a default one. Any help would be greatly appreciated!

o01
  • 5,191
  • 10
  • 44
  • 85

2 Answers2

1

You can do this from the command line by installing Android's SDK with or without Android Studio (a GUI wrapper application I believe). If you're on a Mac you can use Homebrew: brew install android-sdk.

Once that SDK is installed, you simply: 1. Create a Device Definition (only if you need an underlying hardware config that isn't pre-populated within the SDK; e.g. I believe common models like Nexus 7 come pre-installed for use in a new AVD). 1. Create an Android Virtual Device using that newly-created Definition.

Here is a solid guide from Amazon (whose FireOS is an Android mod so there's lots of overlap for building and testing locally for devs).

mecampbellsoup
  • 1,260
  • 18
  • 16
  • `brew install android-sdk` no longer works. They are not maintaining that package anymore; you can still get an old version via `brew cask install android-sdk` but it's probably advisable to get a new version instead. You can download the full IDE, or command line tools only. https://developer.android.com/studio/index.html – Edward Ned Harvey Oct 22 '17 at 14:17
1

No, there are no emulators by default, so you should create at least one. You can do this by clicking the Android Virtual Device Manager icon in the Eclipse toolbar. Hope this helps.

Egor
  • 39,695
  • 10
  • 113
  • 130