forked from jordaaash/react-native-webview-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmodify_java_project_steps
64 lines (49 loc) · 1.84 KB
/
modify_java_project_steps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Modify Guide
------------------------------------------------
STEP 1. Move xwalk core file to current project.
mkdir android/app/libs && cp node_modules/react-native-webkit-webview/libs/xwalk_core_library-22.52.561.4.aar android/app/libs/
------------------------------------------------
SETP 2. Include module in your Android project
Modify android/setting.gradle add following lines.
...
include ':CrosswalkWebView', ':app'
project(':CrosswalkWebView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webkit-webview')
------------------------------------------------
STEP 3. Include libs in your Android project
Modify android/build.gradle add following lines.
...
allprojects {
repositories {
mavenLocal()
jcenter()
flatDir { // <--- add this line
dirs 'libs' // <--- add this line
} // <--- add this line
}
}
------------------------------------------------
STEP 4. Modify android/app/build.gradle add following lines.
...
dependencies {
...
compile (name: "xwalk_core_library-22.52.561.4", ext: "aar") // <--- add this line
compile project(':CrosswalkWebView') // <--- add this line
}
```
------------------------------------------------
STEP 5. Register package
Modify android/app/src/main/java/com/YOUR_PROJECT_NAME/MainApplication.java
import com.jordansexton.react.crosswalk.webview.CrosswalkWebViewPackage; // <--- add this line
public class MainApplication extends Application implements ReactApplication {
......
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new CrosswalkWebViewPackage() // <--- add this line
);
}
......
}
------------------------------------------------
Done