Thursday, 5 April 2018

>Please fix the version conflict either by updating the version of the google-services plugins (information about the latest version is available at http://bintray.com/android/android-tools//com.google.gms.google-services/) or updating the version of com.google.android.gms to 12.0.1



This problem occurs when google play services  and its dependencies have different versions, however google play services require its all dependencies of same version.

So, to fix this -

Open build.gradle (Module: app) and go into dependencies section and check all dependencies that starts like com.google.xxx:zyx-zbc:12.0.x;. Now change its version to the version of google play service (generally it is last one).



Now sync the gradle.

Monday, 2 April 2018

How to generate Google Map API key for any Android Project ?

Google map API key is necessary to add Google map to your any application. So, why we require this key ?

This API key is required because you have to access the Google map server. You can restrict this key only for Android app. This is free and any numbers of user can use it.

Let see how you can generate Google map API key for your Android project.

Start a new project in Android Studio and select Google Map Activity. When project open in Android Studio it open on google_maps_api.xml file by default.


You can see the instruction to generate the API key as well as the link (Third line of comment) to generate that API key. Just copy this link and paste it on any browser.


It will ask your gmail username and password, just put your email and password to login into your gmail account.


Now register your project for Google Map API in Google API Console by clicking Continue.


 It will take some time to enable API, just wait for it.


After API is enabled, click on Create API Key .


It will also take some time to create API key, just wait for it.


Now your API key is ready to use just copy it and use it in your app.



You should paste this API key in your file google_maps_api.xml  of your Android app.



Error :- Google Map fragment/activity is blanked with Google logo and update google play services in Android Studio.

When we develop Google Map fragment in Android Studio, it shows only blank map with Google logo. We stuck here, why it is so ? However we have done everything fine.


 Before this we also find that we don't have updated Google Play Services as message shown by emulator like -


So, how this can be resolved ?

Let see, how these Google Map related problems can be resolved ?

First See how to update Google Play Services.

Go to -

Tools ----> Android ------> SDK Manager 

A dialogue window will appear. Click on SDK Tools  tab. Find the Google Play Services. You will see that it is unchecked and status is Not installed.


Check Google Pay Services then click Apply. A confirmation box will appear Click on Ok.
Download will be started if you are connected to the Internet. After download done click on Finish.









Now your Google Play Services is updated. And you can run your map fragment now.

After updating Google Play Services, if you again can not see the map or you only see the blank map with Google logo like screen shot given above then-

We know that for developing map activity in Android Studio, we require Google Map API key generated form google API console. If you using key that is not generated from developer machine, it show blank map. So make sure that you should generate API key from the machine from where you are developing the map activity.

How to generate Google Map API key ?

Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...