Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not get unknown property 'PLAY_SERVICES_VERSION'

i am getting Could not get unknown property 'PLAY_SERVICES_VERSION' error in ionic build after installing cordova-plugin-googlemaps in my ionic 3 app. if i remove this plugin then no error is showing in build. after adding this plugin again error is showing.

ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE"

i replaced YOUR_ANDROID_API_KEY_IS_HERE with the key i got from google.

same way i added in another app there it was working. here its not working

like image 930
tanveer ahmad dar Avatar asked Jan 31 '18 06:01

tanveer ahmad dar


1 Answers

In \platforms\android\project.properties, replace PLAY_SERVICES_VERSION by “+” only

com.google.android.gms:play-services-base:+
com.google.android.gms:play-services-ads:+

Another way: install cordova plugin to create version automatically

cordova plugin add cordova-android-play-services-gradle-release
like image 129
Mr.Zon Avatar answered Nov 10 '22 03:11

Mr.Zon