Need help with project-wide variable values and running example project
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:
supportLibVersionplayServicesVersionandroidMapsUtilsVersion
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!
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, 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?
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.
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.
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" }
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.