Import bug MapView Superclass not found Dalvik class loader

by Fred Grott(shareme) » Tue, 04 Aug 2009 22:59:29 GMT


Sponsored Links
 ello and Good Morning,

I was doing examples of MapView to finish my templates for the
AndCooper Build tool and found that no matter what example I try I get
the same exception errors in SDK 1.5r3..

First lets head off the obvious.

-No widgets are present in the example.
-Simple class:

package com.mobilebytes.mymapview;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;


import android.os.Bundle;



public class MyMapViewActivity extends MapActivity {


private MapView mapView;
private MapController controller;


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
initMapView();
initMyLocation();


}

/** Find and initialize the map view. */
private void initMapView() {
mapView = (MapView) findViewById(R.id.mapview);
controller = mapView.getController();
mapView.setSatellite(true);
mapView.setBuiltInZoomControls(true);
}

/** Start tracking the position on the map. */
private void initMyLocation() {
final MyLocationOverlay overlay = new MyLocationOverlay(this,
mapView);
overlay.enableMyLocation();
//overlay.enableCompass(); // does not work in emulator
overlay.runOnFirstFix(new Runnable() {
public void run() {
// Zoom in to current location
controller.setZoom(8);
controller.animateTo(overlay.getMyLocation());
}
});
mapView.getOverlays().add(overlay);
}

@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}


AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mobilebytes.mymapview"
android:versionCode="1"
android:versionName="1.0">
<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" />
<application android:icon="@drawable/icon" android:label="@string/
app_name">
<activity android:name=".MyMapViewActivity"
android:label="@string/app_name">
<uses-library
android:name="com.google.android.maps" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />



</manifest>

Layout/main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"



Import bug MapView Superclass not found Dalvik class loader

by Fred Grott(shareme) » Tue, 04 Aug 2009 23:03:37 GMT


 ever mind found the error

Placement of the uses-library of Google Maps has to occur after the
ending activity tag..





On Aug 4, 9:56am, "Fred Grott(shareme)" <fred.gr...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. What's the bar at the top of the screen called?

Note: Don't mean to double post, but I didn't see my initial post
appear.  Reposting.

Hi, I've been tasked with designing the UI for our Android app and I'm
trying to gather as much information as I can to be well informed.
Quick question...  What's the bar at the top of the screen called?
I'm trying to refer to it in some documentation and would like the
official title for it.

Thanks!

--~--~---------~--~----~------------~-------~--~----~

2. Library is used before it is built problem

Hi all
I have a problem of using the library but the library is not already
be built during then compile time.
That means I use the library before it is built, then of course
causing the error.

Can anyone give me a suggestion? How to define the library to make
earlyer?

BR
John
--~--~---------~--~----~------------~-------~--~----~

3. Trackball doesn't give me click events, but touch screen does

4. Stream a very large mp3?

5. When SIM PIN is blocked, the ril can not function well.

6. When SIM PIN is blocked, the ril can not function well

7. Android Tutorial on reading / writing simple files?