0

i really need your wonderful help. The OSMDROID map doesn't load, i keep looking the code line by line and dont get it............... this code works on the phone ( shows the map perfectly )........ this code works on the emulator ( doesnt show the map)*

i put the screencapture http://i1196.photobucket.com/albums/aa402/funkee_iads/osmdroidnotLoad.png

this below appears in the graphical layout

The following classes could not be instantiated: - org.osmdroid.views.MapView (Open Class, Show Error Log) See the Error Log (Window > Show View) for more details. Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse

and the errorlog shows

org.osmdroid.views.MapView failed to instantiate it really weird.

i use this libs

-slf4j-android-1.5.8.jar / -osmdroid-android-3.0.8.jar / -osmbonuspack_v2.4.jar / -mapsforge-map-writer-0.3.0-jar-with-dependencies.jar

here i put the code::::

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
     android:background="#ffd7bd"
    android:orientation="vertical" >

    <TableRow
        android:id="@+id/tableRow1"
        android:layout_width="match_parent"
        android:layout_height="45dp" >

      <ImageView
        android:id="@+id/imageView0"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="#ffd7bd"
       android:orientation="vertical"
       android:layout_marginLeft="-200dp "

        android:textStyle="bold"
   android:textColor="#000000" android:shadowColor="#8a6603"
   android:shadowDx="3" android:shadowDy="2" android:shadowRadius="1.8"
        android:src="@drawable/muestra2" />

    </TableRow>

  <org.osmdroid.views.MapView
        android:id="@+id/openmapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>

</LinearLayout>

thanks for your help

funkeeiads
  • 137
  • 4
  • 12

2 Answers2

0

I never expected taht but only adding a permission works perfect

uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

no idea why i need this permission but it works

funkeeiads
  • 137
  • 4
  • 12
0

It is among the permissions that osmdroid requires. I think it is needed because osmdroid needs access somewhere to download the tiles of the map.

Andres Felipe
  • 625
  • 7
  • 24