Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have a look at the Google MapsDemo that is included in the SDK my path is:</p> <p><strong>C:\android-sdk\add-ons\addon-google_apis-google_inc_-10\samples\MapsDemo</strong></p> <p>I had a quite anoying problem (<a href="https://stackoverflow.com/questions/10205785/mapview-mapactivity-crash-on-some-devices">MapActivity crashes on some devices</a>) that was only showing up on certain(!) Android devices and also not in the Emulator. What I did was, to strip down the working demo until it was similar to my basic example. Then it turned out that Samsung phones don't accept package names not starting with <strong>com.</strong>, while other devices (HTC Flyer) do! But this is not your problem, since you are using a <strong>com.</strong> package name.</p> <p>There might be one more thing that comes to my mind. You didn't post your main.xml. If you use a nested LinearLayout below the MapView this also crashes the app. On top of the MapView it works fine. So in case you are using something like:</p> <pre><code>&lt;LinearLayout ... &gt; &lt;com.google.android.maps.MapView ... /&gt; &lt;LinearLayout ... &gt; &lt;Button .../&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>This could cause your problem. This is reproducable and throws exactly the same <strong>java.lang.ClassCastException</strong> error.</p> <p>Also be sure to have your <strong>&lt; uses-permission ></strong> and <strong>&lt; uses-library ></strong> statements in the right place, as the guys said before. The first one must be a direct child of the <strong>&lt; manifest ></strong> node. The second one must be a direct child of the <strong>&lt; application ></strong> node.</p> <p>I hope this helps you. I was going crazy with this stuff.</p> <p>Bernd</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload