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
'Mobile > ReactNative' 카테고리의 다른 글
[Cordova] 코도바 하이브리드 앱 - Intro (0) | 2023.03.05 |
---|---|
[RN] react-native-http-cache getMainDiskStorageCache error (0) | 2019.06.11 |
[RN] React Native device info 사용하기 (0) | 2019.05.30 |
[RN] React-Native NetInfo 사용하기 (0) | 2019.05.29 |
[RN] React Native WebView Debugging (0) | 2019.05.28 |