How to fix Google Play Services 2 Library install to Eclipse

后端 未结 5 1456
情歌与酒
情歌与酒 2020-12-14 22:23

I\'ve tried to follow https://developer.android.com/google/play-services/setup.html instructions in Eclipse for Mobile Developers (Juno), but am getting multiple errors with

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 22:56

    I had the same problem. I went to Properties->Java Build Path and clicked on the Projects tab. Then I added google-play-services_lib using the Add button. This got me this run-time exception:

    E/AndroidRuntime(9469): Caused by: java.lang.ClassCastException: com.google.android.gms.maps.MapFragment cannot be cast to android.support.v4.app.Fragment

    So then I changed the main.xml file entry from this:

          android:name="com.google.android.gms.maps.MapFragment"
    

    to this:

        android:name="com.google.android.gms.maps.SupportMapFragment"
    

    And FINALLY, it runs, but NOW no map due to authorization failure. So I am off on another search.

    thanks Google for making it so complicated and for posting incorrect instructions!

提交回复
热议问题