1. Download our Official Android App: Forums for Android!

Andriod Maps - Class Error

Discussion in 'Android Apps & Games' started by pinkfloydim, Jan 8, 2013.

  1. pinkfloydim

    pinkfloydim Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    9
    Joined:
    Dec 28, 2012

    Dec 28, 2012
    9
    0
    5
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF"
    tools:context=".TownMapActivity" >

    <fragment
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.MapFragment" />

    <!-- Tab Section -->

    <include layout="@layout/tab_section" />

    </RelativeLayout>

    Now this gives me :

    java.lang.ClassNotFoundException: com.google.android.gms.maps.MapFragment

    I have included the google-play-services.jar, and can see that class, but it always crashes the app.

    Any ideas how to fix, have followed all the stuff on the andriod dev site, and can't get my map to load at all.
     

    Advertisement

  2. pinkfloydim

    pinkfloydim Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    9
    Joined:
    Dec 28, 2012

    Dec 28, 2012
    9
    0
    5
    Actually needed to add an external library into the build to get this to work. Not mentioned in the andriod docs. SO live and learn.
     

Share This Page

Loading...