File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## iOS
4
4
5
- ## Android
5
+ ## Android
6
+ 1 . Add project to ` android/settings.gradle ` :
7
+ ``` diff
8
+ rootProject.name = 'MyApp'
9
+
10
+ include ':app'
11
+
12
+ + include ':@react-native-community_async-storage'
13
+ + project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
14
+ ```
15
+
16
+ 2 . In ` android/app/build.gradle ` add to dependencies:
17
+ ``` diff
18
+ dependencies {
19
+ ...
20
+ + implementation project(':@react-native-community_async-storage')
21
+ }
22
+ ```
23
+
24
+ 3 . Then, in ` MainApplication.java ` :
25
+ ``` diff
26
+ package com.myapp;
27
+
28
+ + import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
29
+
30
+ ...
31
+
32
+ @Override
33
+ protected List<ReactPackage> getPackages() {
34
+ return Arrays.<ReactPackage>asList(
35
+ new MainReactPackage(),
36
+ + new AsyncStoragePackage()
37
+ );
38
+ }
39
+ ```
You can’t perform that action at this time.
0 commit comments