Hi everyone, i'm a new developer on Android. I need your help. I look
tutorial HelloMapView on
http://developer.android.com/guide/tutorials/views/hello-mapview.html
.
i use eclipse ADT for developing and at this line a get an error at
compiler time.
mapView = (MapView) findViewById(R.id.mapview);
Error : Cannot cast from View to MapView
mapview in associated files
mapview in layout file
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="APiKEy"
/>
<LinearLayout
android:id="@+id/zoomview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/mapview"
android:layout_centerHorizontal="true"
/>
R.java
public static final class id {
public static final int mainlayout=0x7f050000;
public static final int mapview=0x7f050001;
public static final int zoomview=0x7f050002;
}
I didn't do different things from tutorial. How can i fix it? Thanks
for your replies.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---