Warning: Async Storage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/async-storage' instead of 'react-native'. See https://github.com/react-native-community/react-native-async-storage

1. npm install  

npm install @react-native-community_async-storage -save

2. react-native link 

react-native link @react-native-community_async-storage

 3. In android/app/build.gradle add to dependencies:

implementation project(':@react-native-community_async-storage')

 

> Task :app:compileDebugJavaWithJavac FAILED
MainApplication.java:6: error: package com.reactnativecommunity.asyncstorage does not exist
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
                                            ^
MainApplication.java:37: error: cannot find symbol
            new AsyncStoragePackage(),
                ^
  symbol: class AsyncStoragePackage

 

 

https://github.com/react-native-community/react-native-async-storage

 

react-native-community/react-native-async-storage

An asynchronous, persistent, key-value storage system for React Native. - react-native-community/react-native-async-storage

github.com

 

 

 

반응형

+ Recent posts