Reputation: 501
I can't build my android project, it says that com.google.android.maps does not exist. It is way strange because in my project in libraries I have them. I rebuild the build.xml. The import com.google.android.maps.MapActivity; is not marked as error. What should I do?
Handling Resources...
Generating resource IDs...
C:\android-sdk-windows\tools\ant\build.xml:600: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 13 source files to C:\Users\iie\Documents\NetBeansProjects\AndroidApplication3\bin\classes
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:10: error: package com.google.android.maps does not exist
import com.google.android.maps.MapActivity;
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:16: error: cannot find symbol
public class MapMapa extends MapActivity {
symbol: class MapActivity
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:21: error: cannot find symbol
super.onCreate(icicle);
symbol: variable super
location: class MapMapa
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:23: error: cannot find symbol
setContentView(R.layout.map);
symbol: method setContentView(int)
location: class MapMapa
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:19: error: method does not override or implement a method from a supertype
@Override
C:\Users\bla\Documents\NetBeansProjects\AndroidApplication3\src\menu\dot\MapMapa.java:26: error: method does not override or implement a method from a supertype
@Override
6 errors
C:\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
C:\android-sdk-windows\tools\ant\build.xml:600: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Upvotes: 1
Views: 16151
Reputation: 501
ok, finally I managed to sort it out:
here is a link with everything:
http://code.davidjanes.com/blog/2009/11/13/18-hours-of-jar-hell-with-android-google-maps/
sorry for answering my own question
Upvotes: 2
Reputation: 25673
Make sure you
install the Google APIs in your Android SDK (this means the "Google APIs" choice instead of the "Android X.x" one)
specify to use this library in your manifest XML:
<uses-library android:name="com.google.android.maps" />
choose "Google API" as your "Build Target", not the "Android X.x" one.
FYI, when testing with the emulator AVD, you need to launch the "Google APIs" version instead of the "Android X.x" one.
Upvotes: 4