Get Eclipse for card recognition api

Hi I am developing an android app and am trying to include maps in one of my routines. Following all instructions from Android my java file will not recognize "MapActivity" or import statements to enable the required api. Here is my XML manifest and my class file.

<?xml version="1.0" encoding="utf-8"?>

      

  <uses-permission android:name="android.permissions.INTERNET"/>
  <uses-permission android:name="android.permissions.ACCESS_FINE_LOCATION"/>

<application android:icon="@drawable/icon" android:label="@string/app_name">

 <uses-library android:name="com.google.android.maps" />  

    <activity android:name=".CadetCommand"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="RedLight"></activity>
    <activity android:name="PTCalculator"></activity>

</application>
<uses-sdk android:minSdkVersion="7"/>

      

here is my java file:

    package edu.elon.cs.mobile;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import android.os.Bundle;

public class LandNav extends MapActivity{

}

      

Any suggestion would help.

+2


a source to share


2 answers


You must use the "Google API from Google Inc." as SDK in eclipse, not "SDK Platform Android".



If you don't have it, you can download it using Android SDK and AVD manager (android-sdk / tools / android)

+2


a source


Haven't used it myself, but if you have an external jar you probably just need to right click on it and select "Add to Build Path" from within eclipse.



0


a source







All Articles