react-native-maps icon indicating copy to clipboard operation
react-native-maps copied to clipboard

Need help with project-wide variable values and running example project

Open relnofollow opened this issue 7 years ago • 6 comments

Hi! I'm new to RN development and would like to include react native maps in my first project.

How can I find values for the project-wide variables?

I did steps from Installation instructions, but got stuck at setting up project-wide variables. My project is created from "react-native init" default template where some variables are already set, but these are not:

  • supportLibVersion
  • playServicesVersion
  • androidMapsUtilsVersion

How can I find their values? I was advised to check included example project, but I wasn't able to run it (see question 2) However, I looked at the source code and didn't find hints on variable values.

Error when building example project

When trying to run example project I see message > Task :react-native-maps-lib:compileDebugJavaWithJavac FAILED and get following error. Could you please advice how it can be fixed? I'm running the project in Windows OS and building it for Android platform.

Thank you for your patience and time!

relnofollow avatar Oct 08 '19 13:10 relnofollow

this my running project values:

ext { compileSdkVersion = 28 targetSdkVersion = 28 buildToolsVersion = "28.0.3" minSdkVersion = 16 supportLibVersion = "28.0.0" playServicesVersion = "15.0.1" // or set latest version androidMapsUtilsVersion = "0.5+" }

yusufdonmez avatar Oct 11 '19 13:10 yusufdonmez

@yusufdonmez, thank you so much for your answer! Could you please tell how did you know values for "supportLibVersion", "playServicesVersion", "androidMapsUtilsVersion"? Are these libraries included somewhere in your project and you checked their versions?

relnofollow avatar Oct 11 '19 14:10 relnofollow

I dont know exactly. those times I search so much things I confuse where I find these values. sorry.

Note: I face a problem with these section

ext {

compileSdkVersion = 28 targetSdkVersion = 28 buildToolsVersion = "28.0.3" minSdkVersion = 16 supportLibVersion = "28.0.0" playServicesVersion = "15.0.1" // or set latest version androidMapsUtilsVersion = "0.5+" }

and I remove whole the scope. Map running fine now. I advise you a try.

yusufdonmez avatar Oct 14 '19 08:10 yusufdonmez

Hey guys. I managed to get the map to work without specifying the androidMapsUtilsVersion value at all. May I know what this value means? Because it seems that the module works without it.

salivanas avatar Oct 27 '19 09:10 salivanas

I guess androidMapsUtilsVersion is the version of this library. 0.6.2 seems to be the latest for now And googlePlayServicesVersion is the version of com.google.android.gms:play-services

The following values would work for my updated RN 61.4 project:

buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 // react-native-device-info: option for deviceId firebaseIidVersion = "19.0.1" // !react-native-device-info supportLibVersion = "28.0.0" // react-native-maps googlePlayServicesVersion = "16.0.0" androidMapsUtilsVersion = "0.6.2" // !react-native-maps androidXCore = "1.0.2" }

cvvspb avatar Nov 20 '19 12:11 cvvspb

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 02 '20 22:10 stale[bot]