react-native-maps: Build error related to gradle property supportLibVersion
Bug
The build fails, with a error saying that the gradle property supportLibVersion not exists.
Environment info
System:
OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz
Memory: 504.76 MB / 11.60 GB
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 8.10.0 - /usr/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 3.5.2 - /usr/bin/npm
SDKs:
Android SDK:
API Levels: 27, 28
Build Tools: 27.0.3, 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64
npmPackages:
react: 16.9.0 => 16.9.0
react-native: ^0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
React native info output:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ascencion/IFCarona/node_modules/react-native-maps/lib/android/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':react-native-maps'.
> Could not get unknown property 'supportLibVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Library version: 0.26.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (1 by maintainers)
Try installing directly from github :
Yes, the solution was recently added, you can see it on the link below.
https://github.com/react-native-community/react-native-maps/pull/3106/files
Add
supportLibVersion = "28.0.0"tobuildscriptinandroid/build.gradleAfter we used the solution proposed by Nykollas, we instead receive the error…
Could not find method safeExtGet() for arguments [supportLibVersion, 28.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
We removed the line, and instead updated the root build.gradle to include the supportLibVersion line below. Keen to hear others’ thoughts.
Add this in your android/build.gradle buildscript { ext { buildToolsVersion = “28.0.3” minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 ----->>>>>The lines below<<<<<<<----------- supportLibVersion = “28.0.3” googlePlayServicesVersion = “16.1.0” androidMapsUtilsVersion = “0.5+” } }
This is in no way a solution, please make a release with the fix or reopen the bug
Yes @pietrovismara and @diogoviannaaraujo the proper solution is to make a updated release. I i’ll work on that in soon.
@Nykollas It would be much nicer to have a proper npm release though. If we use the git repository master branch, we will end up installing any unstable code change. Any plan on an npm release?