react-native-maps를 사용하려는데 패키지 인스톨만 했는데도 다음과 같은 에러가 발생했다.
FAILURE: Build failed with an exception. * Where: Build file '/Users/victor/010_dev/gMap/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 error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Build file '/Users/victor/010_dev/gMap/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 at checkExecSyncError (child_process.js:621:11) at execFileSync (child_process.js:639:15) at runOnAllDevices (/Users/victor/010_dev/gMap/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39) at buildAndRun (/Users/victor/010_dev/gMap/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41) at /Users/victor/010_dev/gMap/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12 at processTicksAndRejections (internal/process/task_queues.js:85:5) at async Command.handleAction (/Users/victor/010_dev/gMap/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:164:9
구글링을 해보니 다음과 같은 해결방법이 나와 적용했는데 정상 동작함을 확인했다.
참고 링크 : https://github.com/react-native-community/react-native-maps/issues/3108
애초에 react-native-maps을 설치할 때 다음과 같이 설치 하는 것이다.
$ npm install --save git+https://git@github.com/react-native-community/react-native-maps.git