当我不使用异步存储时,收到“已提取异步存储”警告

时间:2019-06-01 17:33:59

标签: react-native

我在我的React Native应用中收到一个关于异步存储的烦人的黄色警告之一,该警告已从react-native核心中提取出来,并将被删除yada yada yada。我没有在Async Storage中使用任何东西(尽管可能使用了某些模块),并且从未安装过它。当我根本不使用它时,为什么会收到此警告?哦,我该如何摆脱呢?

package.json

{
  "name": "LoganTransitApp3",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.8.3",
    "react-fetch-hook": "^1.6.0-alpha.2",
    "react-native": "0.59.8",
    "react-native-geolocation-service": "^2.0.1",
    "react-native-gesture-handler": "^1.2.2",
    "react-native-iphone-x-helper": "^1.2.1",
    "react-native-maps": "^0.24.2",
    "react-native-permissions": "^1.1.1",
    "react-native-reanimated": "^1.0.1",
    "react-native-rename": "^2.4.1",
    "react-native-svg": "^9.4.0",
    "react-native-vector-icons": "^6.4.2",
    "react-navigation": "^3.11.0",
    "react-navigation-custom-bottom-tab-component": "^1.1.1",
    "react-navigation-tabs": "^2.1.3",
    "reactn": "^2.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.4.4",
    "@babel/runtime": "^7.4.4",
    "babel-jest": "^24.8.0",
    "eslint-config-rallycoding": "^3.2.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.54.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

1 个答案:

答案 0 :(得分:1)

您的问题可能与react-native-permissions软件包有关。 android实现使用AsyncStorage :

  

import { AsyncStorage, NativeModules, PermissionsAndroid } from 'react-native'

     

permission.android.js

有一个open Pull Request可以解决此问题,但是尚未合并(似乎作者正在使用该库的big update,因此没有更新硕士一年以上。考虑分叉或研究另一个图书馆)。