Google Map V2 android map referencing

后端 未结 2 1461
终归单人心
终归单人心 2021-01-24 08:21

I\'m trying to setup google map for android. I\'m seeing the two zoom buttons but no map is getting displayed. I\'ve been struggling hard for last 6-7 hours. Earlier it was show

相关标签:
2条回答
  • 2021-01-24 08:29

    Acrivity have to extends FragmentActivity for proper fragment inflating. Please, check if MainActivity extends FragmentActivity. Remember that if you write app for older versions of Android you have to use support library v4 and SupportMapFragment instead of MapFragment.

    Btw. referencing android library in eclipse doesn't change AndroidManifest.xml, only project.properties. You have to add manually lines like this

    <activity android:name="com.example.android.tictactoe.library.GameActivity" />
    

    only if you use some Activity from library. In case of google maps v2 you only need MapFragment so you don't have to do that.

    0 讨论(0)
  • 2021-01-24 08:44

    You doing the referencing the wrong way, please take a look at this short 8 steps guide that i wrote to get a Google map in your application, please follow the steps precisely and you will have a Google map at the end.

    I was creating a Google map application when i was writing this guide and you can see the end result at it end.

    Creating Google Map API V2

    0 讨论(0)
提交回复
热议问题