Android Application Development Tutorial - 131 - Displaying the MapView

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

This is what worked for me. Also make sure everything in your manifest and layout documents are spelled correctly and all that, because I had a few problems there, as well.

danielward
Автор

Ok after forever of trying to figure out what I was actually supposed to type in to my files for this to work (because Google's code is not completely correct), I finally got it. After doing what Travis says in the video (with the key and all that):

1. Import the google play services into your project. File->Import->locate directory (on windows it is

danielward
Автор

ok for all who didnt get the map succesfully, and got grey titles this is what you need to check:
first of all when you got your hash key be sure it is [MD5] HASH, NOT [SHA1]. its a big difference cus SHA1 is 20 digit hash and it wont work. MD5 van be obtain by simply typing keytool -v -list -keystore ... and you got big list of some data. find it and copy md5 and paste in that textbox for getting your api. and here you go.

Tracid
Автор

I've followed the Google steps for v2 using SHA1 but kept getting a runtime error. Struggling to understand what the problem is so was trying this but now getting message that the emulator I set up in an earlier tutorial isn't' compatible. #confused.com

EmerCarr
Автор

Check what comes up and click Finish.

2. Right click your application project, click Properties, go to Android in the left side, click add, click on the google-play-services_lib, click Apply, click OK

3. Your Activity must implement FragmentActivity (import android.support.v4.app.FragmentActivity;), not Activity, so do that

4. The xml fragment class should be class="com.google.android.gms.maps.SupportMapFragment", not simply MapFragment, like Google says.

danielward
Автор

@jasonlin91 Who forgot the permissions settings? Not Travis as he did it in a previous tutorial.

david
Автор

i have done this and for some reason it wont work on the emulator or my phone, when i put it on my phone i have no icon and nothing happens when i run it via the pc

markgameforeverythin
Автор

This is because Google Maps v1 is now depreciated as of December 2012, meaning that this way to generate a map is now useless. There is a completely new way to access the map using Google Maps v2. Google it to learn how to use it.

CeltiC
Автор

error:No resource identifier found for attribute 'apikey' in package'android'
what's correct?
please guys help me !!

johnmagdy
Автор

I am getting below error when running app.nothing comes out except grayed grid. Although, it is not crashing my app but after digging bit i got below error logged.

couldn't get connection factory client


any idea how to resolve this?

Really appreciate your inputs on this.

tapanpatel
Автор

Also I meant that your Activity must extend FragmentActivity, not implement

danielward
Автор

setBuiltInZoomControls(true) method does not exist any more in fact it apparently does not need to be used since it is enable by default! But I did in

ReubenJohnMV
Автор

Remember to add in manifest
manifest
uses-permission
application
uses-library /

datapaal
Автор

I'm getting this when I try to launch the app.

I added the internet permission and uses library tag to the manifest. Any thoughts?


[2012-10-24 14:57:47 - STAMP] Please check logcat output for more details.
[2012-10-24 14:57:47 - STAMP] Launch canceled!

almyz
Автор

@shashkes the mistake i made was that where ur supposed to have map = I put main instead of mvMain. Simple typo. Just go back back some tutorials and see if you have everything right

yuhzimmi
Автор

I am not able to use extends MapActivity.

jerricadecker
Автор

hey guys. im having a problem because i will only get an api key on the google website if i type in my SHA1 key and will get an error with the MD5 key. so clearly google has made some changes. the api key i typed in won't work following travis's tutorials. please help someone!!

tiemysou
Автор

does any one have problems with the xml? i followed all the instructions and upon pasting the google maps xml layout i get this error code to the xml

"Failed to find style 'mapViewStyle' in current theme"

can anyone help? travis i hope you could read this...

tikyorules
Автор

@yuhzimmi what was the mistake i'm getting the same thing and i did put in the permissions

shashkes
Автор

See if you forget to type at the end of sha1 key: "com.example" (this is package name of your app)

BossPG
welcome to shbcf.ru