Question

I am using Google API for android. I wrote this line :

GeoPoint point = new GeoPoint(234120, 4885693);

I changed the properties of the project and included Google APIs. This is my manifest file:

<application 
        android:name=".Test"
        <uses-library
            android:name="com.google.android.maps"
            android:required="true" />
        <activity
            android:name=".Main"

The error is:

07-09 15:28:10.046: E/AndroidRuntime(7248): Caused by: java.lang.NoClassDefFoundError: com.google.android.maps.GeoPoint
Was it helpful?

Solution 2

I think you should check out with this question:

Libraries do not get added to APK anymore after upgrade to ADT 22

I also had the same problem before.

OTHER TIPS

Add
<uses-library android:name="com.google.android.maps" />

below application tag and above activity tag.

e.g.

<application 
    android:name=".Test">
    <uses-library
        android:name="com.google.android.maps" />
    <activity
        android:name=".Main"...

This "using-library" node is used by Play to determine the compatible devices, if I'm not mistaken ...

In eclipse, for the Maps classes to be recognized, you need to import Play Services as a project, then include this project in your own as a library. You will also need :

  • com.google.android.providers.gsf.permission.READ_GSERVICES permission
  • a meta-data node with the value for com.google.android.maps.v2.API_KEY

Try this for a kick-start tutorial ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top