I'm a noob to Android so bear with me and apologies if my post is moronic. Basically, I'm trying to add a mapview to the XML which is causing a few problems, the error I'm getting is:
06-30 12:29:04.760: ERROR/AndroidRuntime(320): java.lang.NoClassDefFoundError: package.android.mapclass
From what I can tell the error is happening on this call:
Intent i = new Intent(oldclass.this, mapclass.class);
The mapclass itself is:
package package.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.google.android.maps.MapView;
import com.google.android.maps.MapActivity;
import android.util.Log;
public class mapclass extends MapActivity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.viewmap);
protected boolean isRouteDisplayed() {
return false;
}
}
Here's where it gets interesting, if I swap out
public class mapclass extends MapActivity {
and replace it with
public class mapclass extends Activity {
Then it works absolutely correctly (albeit without calling the calling the MapActivity). There is a reference to the maps in the manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="package.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-library android:name="com.google.android.maps" />
<uses-library android:name="com.google.android.maps.MapView" />
<uses-library android:name="com.google.android.maps.MapActivity" />
<application android:icon="@drawable/icon"
android:label="@string/app_name">
I'm guessing that I'm doing something horribly wrong with regards to the activity in the xml? I've tried fiddling but so far to no avail, does anyone have any ideas?
Thanks,