MapActivity problem: package maps does not exists

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

MapActivity problem: package maps does not exists

Postby Sbardascione » Wed Apr 07, 2010 4:34 pm

Hi everybody, its my first post, i'm a newbie of android application.
Thank you for your help.
I'm tryng to follow the tutorial on android site about map viewing.(cant post the url, the forum gives me an error sorry)
But when i try to build the project (i'm working with netbeans) it gives me this error:
Code: Select all
/home/carmelo/NetBeansProjects/ProvaGM/src/org/me/provagm/MainActivity.java:9: package com.google.android.maps does not exist
import com.google.android.maps.MapActivity;
/home/carmelo/NetBeansProjects/ProvaGM/src/org/me/provagm/MainActivity.java:16: cannot find symbol
symbol: class MapActivity
public class MainActivity extends MapActivity {
/home/carmelo/NetBeansProjects/ProvaGM/src/org/me/provagm/MainActivity.java:21: cannot find symbol
symbol  : variable super
location: class org.me.provagm.MainActivity
        super.onCreate(icicle);
/home/carmelo/NetBeansProjects/ProvaGM/src/org/me/provagm/MainActivity.java:19: method does not override or implement a method from a supertype
    @Override
4 errors
BUILD FAILED (total time: 0 seconds)


this is my AndroidManifest.xml:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="UTF-8"?>
  3.  
  4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.     package="org.me.provagm">
  7.  
  8.          <uses-permission android:name="android.permission.INTERNET" />
  9.  
  10.     <application>
  11.  
  12.         <uses-library android:name="com.google.android.maps" />
  13.  
  14.          <activity android:name=".MainActivity" android:label="@string/app_name"
  15.  
  16.     android:theme="@android:style/Theme.NoTitleBar">
  17.  
  18.             <intent-filter>
  19.  
  20.                 <action android:name="android.intent.action.MAIN"/>
  21.  
  22.                 <category android:name="android.intent.category.LAUNCHER"/>
  23.  
  24.             </intent-filter>
  25.  
  26.         </activity>
  27.  
  28.     </application>
  29.  
  30. </manifest>
  31.  
  32.  
  33.  
  34.  
Parsed in 0.003 seconds, using GeSHi 1.0.8.4


Thank you for help.
Sbardascione
Freshman
Freshman
 
Posts: 3
Joined: Tue Apr 06, 2010 7:57 pm

Top

Postby Sbardascione » Fri Apr 09, 2010 10:21 am

The tutorial is this one
Sbardascione
Freshman
Freshman
 
Posts: 3
Joined: Tue Apr 06, 2010 7:57 pm

Re: MapActivity problem: package maps does not exists

Postby damienix » Tue Sep 07, 2010 10:49 pm

In your project there is a section "Libraries".
1. Select "Add JAR/Folder from its context menu.
2. Find "maps.jar" in .../your-android-sdk/add-ons/addon_google_apis_google_inc_8/libs/" and add it.

Make sure that you have downloaded the "Google APIs by Google" in version you want to code (you can do it with .../your-android-sdk/tools/android" tool)

Now just use it by adding
Code: Select all
import com.google.android.maps.*

at the begining of your file

Enjoy ;)
damienix
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Sep 07, 2010 10:27 pm

Re: MapActivity problem: package maps does not exists

Postby Sbardascione » Wed Sep 08, 2010 9:17 am

Thank you, i'll try tonight.
Sbardascione
Freshman
Freshman
 
Posts: 3
Joined: Tue Apr 06, 2010 7:57 pm

Re: MapActivity problem: package maps does not exists

Postby JEvers » Tue Feb 22, 2011 10:39 pm

I have an Android tablet that does not have the Google APIs extension. I want to ensure that maps.jar is deployed with my project. I have tried the advice from damienix (although I am using Eclipse Helios which seems to be slightly different) and I end up with maps.jar appearing in my Referenced Libraries folder but my project errors in the emulator.

The error seems to be
02-22 21:37:37.395: WARN/dalvikvm(226): Class resolved by unexpected DEX: Lhello/MapView/HelloMapView;(0x44da33a0):0x147b88 ref [Lcom/google/android/maps/MapActivity;] Lcom/google/android/maps/MapActivity;(0x44da33a0):0x14e760
02-22 21:37:37.425: WARN/dalvikvm(226): (Lhello/MapView/HelloMapView; had used a different Lcom/google/android/maps/MapActivity; during pre-verification)
02-22 21:37:37.565: WARN/dalvikvm(226): Unable to resolve superclass of Lhello/MapView/HelloMapView; (44)
02-22 21:37:37.565: WARN/dalvikvm(226): Link of class 'Lhello/MapView/HelloMapView;' failed

What am i doing wrong?

Jevers
JEvers
Freshman
Freshman
 
Posts: 2
Joined: Sat Oct 09, 2010 11:36 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests