Eclipse New class , MapActivity not found ! - android

I want to create new class MapActivity from Eclipse.
I go File-> New -> Class on Superclass-> Browse, and when I type MapActivity there is no results.
In Windows-> Android SDK and AVD Manager there is no new updates, I have installed SDK from version 1.5 to 2.2
Can some one help me with this?
Thanks

You need to select GoogleAPI by Google Inc package installed , create an AVD profile using the same and then use map activity..This should help you ...

The steps Ravi mentioned are necessary, but to get things working in your existing eclipse project, without creating a new one, change the build target:
Project Properties->Android->Google APIs (x)

Make sure you have the "Google APIs by Google Inc." package installed for the API version you're using. MapActivity isn't included in the standard Android API.

1) Make sure you build target has Google APIs included. In eclipse this is done in project properties in the android menu.
2) If using emulator - the AVD must also target an api with Google APIs included.
3) Add <uses-library android:name="com.google.android.maps" /> as child (inside) the application-tag in your manifest.

If you are using eclipse id, then click on AVD Manager and then it will show you the list of installed as well as un-installed packages. Select Google api packages and click on install. Then you will not this problem.
See the details

Related

com.google.gms.location does not exist

I am trying to add a map on the Xamarin.Android application. So far, I have added only map, I did not add any location listener. However, I keep getting the following error
package,com.google.gms.location does not exist
I wonder what I am missing or doing wrong?
Here is the dll's added into the references from the nuget
Make sure all packages are of the same version (27.0.0)
Make sure Xamarin.Build.Download is installed (it downloads the required .jar files etc.)
Clean & Rebuild the android Project
Try entering Update-Package -Reinstall Xamarin.GooglePlayServices.Locationinto the package manager console
Clean & Rebuild the android Project
Try a higher version number of the package (newer ones are stable too)
If you want to use GooglePlayService. The test device/emulator of your app needs to include Google API. If you are using an emulator you can follow the steps below:
Download Google API System Image for your android API Level through Tools->Android->Android SDK Manager(ex for API Level 25 ):
Create a new Google API Emulator through Tools->Android->Android Emulator Manager->Create:
Clean your project and rebuild it, run your project in this emulator.

how to add the new api level in android?

I am using Android API level-8(i.e. Android 2.2 Froyo). I want to add the new api level-5 ( i.e. Android 2.0 Eclair).
I have updated avd manager but the api level-5 can't display.
When I import the project in workspace the right click the project select android tools and fix the Project properties then Display this type error in console
Unable to resolve target 'android-5'
You should clarify what you mean by add.
If you mean add another OS image, then you should use the Android SDK Manager.
In the package name you should find the Android 2.0. If you didn't have it installed, then install it and create a new OS Emulator with this OS version.
There's a topic already discussed here. Link
If you mean you want to build against Android 2.0, you should simply right click on the project, go to properties, and then Android. You should see a list of targets. Simply check the one right for you.
Go to sdk manager and install required lvl from it
Goto window->android sdk manager and check the boxes you want to install. One of the checkboxes also concerns the avd, install it and then goto window->avd manager to create a new AVD.

Android SDK. Google API SDK link

I'm trying to install the Google APIs so that I can use Google Maps in my application. The problem is simple: SDK Manager doesn't have the link that it needs to query the servers for libraries to install.
The links I have in Help, install new software, available software sites are : https://dl-ssl.google.com/android/eclipse and http://download.eclipse.org/releases/helios
What link do I need in order to properly download the Google APIs?
I cannot extend my Activity to MapActivity even though the manifest has <uses-library android:name="com.google.android.maps", I have an api key, and my main.xml has the <com.google.android.maps.MayView tag.
Thanks,
The links I have in Help, install new software, available software sites are : https://dl-ssl.google.com/android/eclipse and http://download.eclipse.org/releases/helios
Those are for Eclipse. Eclipse is not Android.
What link do I need in order to properly download the Google APIs?
You do not need a "link".
Step #1: Choose Window > Android SDK Manager from the Eclipse main menu
Step #2: Check the checkboxes beside any "Google APIs" you want, for different API levels
Step #3: Click the "Install packages..." button and follow the prompts, then close up the SDK Manager
Step #4: Select your desired project, and choose Project > Properties from the Eclipse main menu
Step #5: In the Properties window, choose Android, then set your build target to be one that has the Google APIs:

Eclipse/Android: can't install Google APIs targets

To use a MapView in my android application, I need to to run it in a "Google APIs (Google Inc.)" target. However, I can't figure out how to download one.
In Eclipse, Android SDK and AVD Manager -> Third party add-ons -> Google Inc. -> No packages found
Although I can see that they are a bunch of packages available when looking at the url
Same issue as here.
Here help would be appreciated!
For reference, here's how I solved this:
I updated my ADT
That gives me a new a new SDK manager in eclipse under Window. From there, I was able to install the missing API targets!

getting error msg install failed missing shared library

i have made one application which uses google maps APi,i am using titanium 1.2.2 and mobile sdk 1.5.1 for android,wenever i am trying to run the app on emulator,console shows an error
[INSTALL_FAILED_MISSING_SHARED_LIBRARY]
what does this error means and how to fix it??
I had the same issue. Make sure you have changed the target from Android### to Google APIs in the AVD Manager.
Open Android SDK Manager
Select Tools -> Manage AVDs
Select a/the virtual device and click edit
In the target Select Google APIs...
If this target does not exist in the list, you need to install the Google APIs for the Level you require.
This will appear in the check list under the desired Level in the Android SDK Manager. Once this is installed (go grab yourself a coffee, it can take some time), repeat steps 1 - 4.
You can add android:required="false" flag to your manifest file and the application should be able to start.
<uses-library
android:name="com.google.android.maps"
android:required="false"/>
Then you have to make sure to protect your code from throwing an exception in places where you need it. You can try something like this to check if library is present:
Class.forName("com.google.android.maps");
run android.exe or android.sh utility this will bring up the program to install android SDk. Go to third party add-ons and select Google Api's. After they have been deployed/installed. Please make sure to re-start adb. If you are prompted for a restart of adb. Please say yes.
You have to add
<uses-library android:name="com.google.android.maps" />
between the <application> </application>
Tags of the Manifest.
This happens when your application requires a library that you either haven't included or your device doesn't have it.
Make sure you're using the Google API for Google Maps.
The usual suggestion to ensure you are running against a Google APIs android SDK is correct.
However, there is also a bug if you are using Titanium Studio whereby updating the SDK version in Titanium does not update the SDK in the actual android AVD. You will need to open the Android SDK Manager (SDK Manager.exe or SDK Setup.exe), select "Virtual Devices" on the left and then edit all appropriate devices to set their 'Target' to the desired SDK.
I also came across this same problem and followed #CraigS steps but it didnt help.I was working on the emulator.
Then i tried uninstalling the app from the emulator and running the project again. It installed successfully. Just try this also if CraigS method doesn't help. :)

Categories

Resources