React Native Accessing view manager configs directly off UIManager via UIManager['AIRMap'] is no longer supported
Asked Answered
N

6

10

I'm getting the following warning "Accessing view manager configs directly off UIManager via UIManager['AIRMap'] is no longer supported. Use UIManager.getViewManagerConfig('AIRMap') instead". Its been showing since I have installed the react-native-maps package. Should I ignore it or its there a solution for it?

Thanks in advance

Newly answered 24/2, 2019 at 22:21 Comment(0)
B
19

This is fixed by downgrading "react-native-gesture-handler" to 1.3.0. You also need to clear the cache or you'll continue to see the warning.

  1. Modify your package.json:

"react-native-gesture-handler": "~1.3.0"

  1. Reinstall dependencies:

npm install or yarn install

  1. Restart expo with a clear cache:

expo r -c

Blintze answered 19/9, 2019 at 3:5 Comment(2)
Works perfect. Although, it's pretty frustrating that downgrading is the solution to an app-breaking error.Unequaled
Using expo install dependency-name-here will ensure that the 'Expo-supported' version of the dependency is installed.Converse
P
3

To hide the warning, downgrade react-native-gesture-handler to ‘1.3.0’.

yarn add [email protected]

Pervade answered 28/8, 2019 at 14:34 Comment(0)
J
1

This appears to be a known issue with react-native 0.58 https://github.com/react-native-community/react-native-maps/issues/2620

Joanejoanie answered 13/3, 2019 at 17:20 Comment(0)
P
1

This is for those who want a quick fix, here are some commands that you can run to fix it. Remember this solution is for expo users.

// make sure you have the latest expo-cli (if you have >=3.1.0, you can skip this)
$ npm install -g expo@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear
Pedology answered 29/9, 2019 at 9:38 Comment(0)
M
0

you need just downgrade react-native-gesture-handler to 1.3.0.

also You can do these steps:

  1. directly change version in your package.json to ~1.3.0
  2. run npm i or remove it and install through expo
  3. sometimes it needs to clear cache of expo > expo r -c
Mcnamara answered 2/11, 2019 at 8:57 Comment(0)
U
0

If you are using expo, you can now use the command

expo install react-native-gesture-handler

This will make sure nothing breaks by installing react-native-gesture-handler in version 1.3.0 instead of 1.5.x.
There is a pretty recent issue on Github discussing this.

Uraeus answered 7/11, 2019 at 15:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.