I just tried to run my company's app in the new x86 android emulator, but our app relies on the google maps API, and that is not available in the x86 system image that google provided with android sdk release 17. My intuition says the answer is no, but is it possible to get the google apis into this system image somehow? If not, is there any way to conditionally not use a system API like google maps if it isn't present on the device/emulator that you are currently using?
-
2Duplicate of http://stackoverflow.com/a/10540106/82156 – emmby May 12 '12 at 00:10
-
1My question was asked two days before that one. – Kevlar May 16 '12 at 16:32
-
2I have created ready tu run Android x86 images with Google Maps support. You can download them through my blog: http://www.seal.io/2012/09/android-x86-images-with-google-sdk-maps.html – sealskej Sep 02 '12 at 17:22
-
Here's the issue for adding them: https://code.google.com/p/android/issues/detail?id=34066 – Sam Hasler Sep 13 '13 at 15:16
4 Answers
You have to create a system image with Googles libs and permissions. See http://38911bytes.blogspot.de/2012/03/how-to-use-google-maps-api-in-android.html for a cookbook to create and use such an image.

- 329
- 1
- 2
- 2
-
tried the method described in this blog and it worked for me: I can now test my google maps api on the new x86 android emulator – vallllll Apr 02 '12 at 09:41
-
Very interesting information. I haven't looked into this yet but I definitely will! – Kevlar Apr 03 '12 at 16:25
-
Well, this didnt work for me. I get INSTALL_FAILED_CONTAINER_ERROR, when I try to install app with google maps on modified emulator image. – sealskej Apr 04 '12 at 14:19
-
I have changed `android:installLocation="auto"` to `android:installLocation="preferExternal"` and everythink seems working fine :) – sealskej Apr 04 '12 at 21:04
-
1Do we know whether this procedure is allowed by Google's licensing terms for their Maps API and other things not included in vanilla Android? – Kristopher Johnson Jun 27 '13 at 21:40
My intuition says the answer is no, but is it possible to get the google apis into this system image somehow?
There is but the one image, so if Maps are not there, then Maps are not there. You cannot add the Maps add-on to an existing emulator image, except perhaps via software piracy, as the other answer on this question advocates.
If not, is there any way to conditionally not use a system API like google maps if it isn't present on the device/emulator that you are currently using?
Absolutely!
Step #1: Add android:required="false"
to your <uses-library>
element for Google Maps, so you can install the app
Step #2: Sometime before you start trying to use Google Maps, see if you have Maps-related classes using Class.forName()
For example, in this book sample project, my launcher activity sees if we have MapActivity
, and if we do, it passes control to a MapActivity
instance, and if not shows a Toast
.

- 986,068
- 189
- 2,389
- 2,491
As of API 19 (Android 4.4), it looks like Google itself is now providing the Google APIs package for x86.
Package Description
Google APIs (x86 System Image), Android API 19, revision 2
By Google Inc.
Android x86 + Google APIs
Requires SDK Platform Android API 19
Archive Description
Archive for any OS
Size: 195.5 MiB
SHA1: 0fb71d18800064c96a5645166e2ae666275a1e59

- 21,516
- 18
- 92
- 115
Note that the Android 4.3 x86 system image should now have the Google APIs inside of it. It was released on 3/4/2014.

- 6,648
- 8
- 40
- 57
-
4This is not true...Google APIs are not included in the x86 system image – ericwjr Sep 03 '13 at 07:24