Вы находитесь на странице: 1из 10

Last updated: 6th August 2015 - version 2.

0
Watch Videos First:
This section is meant to be used only if you get stuck setting up the
various Android tools. Please watch the videos on setup in the
following sections (for PC/Windows or Mac OSX) and then only if you
have problems do you need to refer to the notes below.
General Notes:
The various tools used in Android development are free, but do use a
large amount of ram (at least by default).
If you have 8GB or more of ram, then its probably ok to use the
default options for ram for the Android Virtual Device and HAXM.
But if you are having problems with AVD starting, or have less than
8Gb of ram, you probably want to set manually the amount of ram
allocated by the AVD and HAXM - See below.
This general advice applies to both Mac and Windows users remember the operating system (OS X or Windows) uses ram itself
and any other programs you have open (including Eclipse, SDK
Manager, Android Studio), etc all take up ram.
Try shutting down non essential apps when developing might also
help with memory issues.
Android Virtual Device Issues - Not booting up.

An Android Virtual Device (AVD) uses memory from your computers


ram. If you have 4GB or less of ram, then you will probably find your
AVD will not start.
Firstly, be sure to leave it for a long time to start. Depending on the
speed of your computer and the ram you have, it could take up to 30
minutes to start!
If you are having problems and it does not start, then you will want to
configure the amount of ram to allocate to the AVD
Here is a picture showing how to configure (in Eclipse, Android
Virtual Device Manager).

You may have to set this value to 768, 512, or even less. Eventually
you should find it starts.
Also: If you are using HAXM - You may have allocated too much
memory there as well, refer to HAXM issues below.
Computer not compatible with HAXM (Windows Users)
HAXM requires an Intel CPU to operate. If your computer does not
have an Intel device, it will not work. In that case, you can still use an
Android Virtual device.

The video setting up an Android Virtual Device covers not using


HAXM. Take a look at it.
Its currently lecture 15 for Windows and lecture 24 for Mac.
This video covers both HAXM and non HAXM usage, so be sure to
watch the entire video. Also the target assumes you have loaded the
correct system images, so be sure to watch the preceding videos for
each of the videos above as well.
Intel VT-x not enabled - Windows Computer
In some cases, Intel VT-x may be disabled in the system BIOS and
must be enabled within the BIOS setup utility. To access the BIOS
setup utility, a key must be pressed during the computer's boot
sequence. This key is dependent on which BIOS is used but it is
typically the F2, Delete, or Esc key.
Within the BIOS setup utility, Intel VT may be identified by the terms
"VT", "Virtualization Technology", or "VT-d." Make sure to enable all
of the Virtualization features.
Here is an example of what to look for, but the wording may be a little
different and possibly the screen may look different as well - In this
case you would want to Enable" the option as it is showing as
disabled.

Once you make the change, save it and re-boot up into windows and
you should not get that error any longer.
HAXM - Reducing the amount of ram it uses - Windows and Mac
Users.
Depending on the amount of ram your computer has, you might have
allocated half of it to HAXM alone!
When installing (or re-installing) HAXM check carefully the amount of
ram its going to use.
You can see in the image below the default amount of ram allocated
is 2GB.

If you have 4GB or less of ram, set this to 512 (the minimum).

Experiment with this amount and also the amount of ram you set for
the AVD and ensure you leave at least 50% or more free ram.
e.g. a 4GB system should not allocated more than 2GB in total to
HAXM and AVD, and preferable only about 1GB.
Remember: Windows and OS X use a lot of ram itself, as does any
other programs you have open (including Eclipse and/or Android
Studio).
Additional tip for 4GB Systems.
A student Harry reported success with a 4GB system selecting a
certain type of device.
Read more here.
Hints for 4GB ram systems
HAXM Issues (Mac Users)
All recent macs have intel CPU's and should work. The HAXM
software on SDK Manager can be a little outdated, so if you have any
issues, grab the latest version from Intels website and install that
manually.
https://software.intel.com/en-us/android/articles/intel-hardwareaccelerated-execution-manager
Also be sure you are running the right version for your version of OS
X.

See general advice above on total memory used for both AVD and
HAXM - you may need to reduce it.
Anti-Virus Software Preventing HAXM being installed (windows).
Darko reported:
IF YOU HAVE AVAST Free Antivirus INSTALLED, UNINSTALL IT
AND VOILA, HAXM CAN BE INSTALLED :)
This might apply to other Anti-virus programs as well. There might be
a way to allow" HAXM to be installed e.g. setting permissions within
the Anti-Virus package itself.
Steven also reported success with a computer that would not load
HAXM and AVAST was the culprit.
https://www.udemy.com/activity/?ids%5B0%5D=1502648036
Bottom line: Be sure to try un-installing/disabling firewalls and/or antivirus programs or check they are not prevent HAXM from working.

USB Drivers Issues (Windows)


Getting a physical Android device can be challenging. For mac users,
things usually just work, but a windows machine needs a driver
loaded.

Usually you can find the driver by going to your phones manufacturer
website and search for you model and then follow the video in section
2 on getting it to work.
Some devices have a harder time with drivers. The LG devices (some
of them) use a generic driver sometimes (one driver to cover many
devices).
LG Drivers
If you have an LG device, you might want to use these.
http://androidxda.com/download-lg-usb-drivers
Flavio, a student submitted these and confirmed they worked on his
device.
If you have another device with hard to find/ generic drivers let me
know and I can update this FAQ.
General notes about getting devices working with
Eclipse/Android studio
After enabling USB Debugging on your device if it still fails to work try
this.
If you device has the option, be sure to set
USB Computer Connection set to Camera(PTP).

Then, in Eclipse Go to DDMS -> Reset your ADB.


Fix with Eclipse not Showing Genymotion Devices
Mark Abraham, a student taking this course posted a discussion
outlining a problem with Genymotion and a solution.
Its documented for Mac users and seems to be unique to OSX
Yosemite on a MAC.
Here is the original discussion link, and I have duplicated the text
below. Thanks Mark.
https://www.udemy.com/activity/?ids%5B0%5D=1502690108&ids
%5B1%5D=1502690098&ids%5B2%5D=1502689722&ids
%5B3%5D=1502689494&ids%5B4%5D=1502688330&ids
%5B5%5D=1502687776
I've discovered a bug and solution that I want to share. That I hope
will save some time for other experiencing this problem.
This relates to using Genymotion with Eclipse on a Mac running
Yosemite. (From what I found googling this problem it's unique to
Yosemite).
First, off be sure Genymotion is actually working and you launch it
from Eclipse as per the videos in this course.
This seems to occur with the project Run Configuration Target set to
"Always prompt to pick device"

The problem:
Even though I have Genymotion up and running, when I click Run
and the Android Device Chooser comes up, my Genymotion device is
not listed anywhere.
The solution:
Select "Choose a running Android device"
And ... here's the trick ... move your mouse to the header row in the
chart in the 'Choose a running Android device' section, position the
mouse pointer on the column boundary between Serial Number and
AVD Name (only works in the header row). The mouse pointer will
change to the usual resize column arrows. Click and hold and slightly
resize the columns.
As soon as you resize the columns, the genymotion device appears
in the list!
Then you can select it and run your app in Genymotion.
It's not a configuration issue or anything like that - just a little bug
where it seems the device list isn't refreshed unless you force it to.
Hopefully this will save others from the frustration I experienced
before discovering this bug online. Credit where credit is due ...
I found the solution here:

http://stackoverflow.com/questions/26158118/genymo... but the


answer seemed a bit buried so I thought I'd write it up again.
Linux Android Virtual Device issues
If you are looking to get HAXM to run, or are having issues with 32 bit
mode, refer to this discussion
https://www.udemy.com/activity/?ids%5B0%5D=1502697626
It has a link to the instructions to get HAXM speed working in Linux,
and what to do to get 32bit Linux to run AVD's.
Fix if Eclipse does not show your Physical Android Device for
Mac OS X Users
Amrut contributed an excellent discussion about this. The link below
will take you to his original discussion and show how to fix this.
https://www.udemy.com/activity/?ids%5B0%5D=1502718326
Thanks Amrut!

Вам также может понравиться