Академический Документы
Профессиональный Документы
Культура Документы
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.
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.
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.
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).
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: