When creating a new android project, the build target has two choices:
Android 2.2, Android Open Source Project
AND
Google API's, Google Inc.
Both show Platform as 2.2 and API level 8
Which to choose (and why)?
The AVD with Google API's contains google Api's like GoogleMaps.
For example:
If you application uses GoogleMaps, then you will have to use an AVD with Google API's.
Related
im new to android programming and im trying to create an android app that loads google maps v2.
I got api key, my code is working with no errors, i'v used some guide to write the code
But here's the problem : if im using min Sdk Version 8 my app crash and not even starts.
if im trying higher Sdk Version i cant test it because i dont have any device besides galaxy s2 and google maps v2 cant load in the emulator.
I will be glad to hear some advices.
Use SupportMapFragment from a FragmentActivity, instead of MapFragment from an Activity. To use fragments on devices older than API Level 11, you need to use the Android Support package's backport of fragments (where FragmentActivity comes from).
http://android-er.blogspot.de/2012/12/using-supportmapfragment.html
Also Please check below step..
check if the "libs" folder containing the "android-support-v4.jar" exists in your project.
"android-support-v4.jar" is located in "/extras/android/compatibility/v4/android-support-v4.jar" under your "android-sdk" drectory.
Before running your project, you must set your project Build target to "Google APIs", not Android x.x. version : Select your project and click Project > Properties > Project Build Target in Eclipse and select any "Google APIs ", and then run your project on your phone. If you use the emulator, also MUST set the AVD of the emulator to the any "Google APIs ".
Once more, you don't need to create the new Google Maps API key in order to test your project, Just use the default provided API key, which is shown as "Key for browser apps (with referers) "in your Google APIs Console.
Finally, the most important is to add Google Play services as an Android library project as follows:
Select File > Import > Android > Existing Android Code Into Workspace and click Next. Select Browse..., enter /extras/google/google_play_services/libproject/google-play-services_lib, and click Finish.
https://developers.google.com/maps/documentation/android/start
reference link
Google maps v2 on android devices with minSDK below 11
Google has stop supporting android api version below 9, So if you are building new app set your min sdk level to 9.
And to test the google map you can use emulator just open sdk manager and install android latest version 4.4, build new emulator configured with android 4.4 and you can run google map in it. Hope this will help you
This has been consistent across a lot of the glass code i've worked on. Why does the target API prefer the former instead of the latter?
Most of the projects I load into eclipse, I have to change the make target for my code to compile. This is the same for Google APIs:15 and GDK15
#target=Google Inc.:Google APIs:19
target=Google Inc.:Glass Development Kit Preview:19
using android development tools eclipse.
When you create an Android project, the Android Development Tools (ADT, based on Eclispse) default to the latest Android API level. Google Glass (and the sneak preview) are special conditions for Android (much like "Wear" is too).
To create a project that runs on Google Glass you need to use the "preview" Glass Development Kit as the target ... because there are hardware differences and a small set of features that are specific to Glass and require that implementation.
When you create an Android project, you have to create the appropriate target environment when you establish the project. For Google Glass, the original release required API level 15 (and the appropriate preview version). With XE16, the level became API level 19 (for compilation), and the newly released Glass Development Kit Preview that was moved up to support the latest Android API level.
I am trying to import sample code with
Build target: Google APIS 1.6
minSDK: 4
I have downloaded the Android API 4 but the lowest Google APIS version I find on the SDK Manager is 8.
Eclipse creates a blank project with no classes and throws AndroidManifest.xml file missing!
Theres a few things I dont understand:
When I create a project using Google APIS only the Google APIS version is important? I forget about Android API?
Are Google APIS versions backwards compatible?
Google API SDK should be available from 1.6 and up version.
They contain the basic SDK for the version, and additional APIs such as C2DM.
Not sure what you mean with backwards compatbility. An 2.2 version SDK should be able to use 1.6. API calls.
I am reading Teach Yourself Android Application Development in 24 Hours, in Hour 6, it asks me to create a new Android Project with:
Build target: Android 2.1 + Google APIs
However, I can only select Android 2.1 OR Google APIs, not both, under the list of build targets, when I hover above Google APIs, it says Android + Google APIs, does it mean if I select Google APIs as build target, it will include Android (which version?)? But what if I want to use, say, "Real3D Add-On" as well as "Google APIs", as there is no way to select multiple targets?
Thanks!
You can only select one target in eclipse.
If you select Google APIS it will be for the Android API version for the Google API listed (and below). If you want the LG Real3D Addon target (I'm guessing it's LG) then it will be for whatever API version it shows.
When I push my app to a Honeycomb AVD I get this:
Package com.myapp requires unavailable shared library com.google.android.maps; failing!
Am I right in thinking this is because the Preview SDK only provides the AOSP SDK, and not the Google components?
Is there currently any way to test apps in the Honeycomb AVD that rely on MapView?
Yes, the preview SDK doesn't include the Google Add-On, and the emulator doesn't have the necessary library.
However, the final SDK is now released and you should be able to create an AVD (emulator image) that contains the Maps shared library by installing the Google Add-On for Android 3.0.