react-native-crosswalk-do

1.0.7 • Public • Published

react-native-webview-crosswalk-do

Forked from jordansexton. Not contributed for two years. Some bugs fixed and added dynamic build.gradle(which taking android compile and sdk versions from ext object)

npm licence

Latest Dependencies

  • react-native >=0.59.8, react >= 16.8.3

Installation

  • From the root of your React Native project
npm install react-native-crosswalk-do --save
 
node_modules/react-native-crosswalk-do/libs/xwalk_core_library-23.53.589.4-arm.aar 
to your 
android/app/libs

Include module in your Android project

  • In android/setting.gradle
...
include ':CrosswalkWebView', ':app'
project(':CrosswalkWebView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-crosswalk-do')

Include libs in your Android project

  • In android/build.gradle
...
allprojects {
    repositories {
        mavenLocal()
        jcenter()
 
        flatDir {          // <--- add this line
            dirs 'libs'    // <--- add this line
        }                  // <--- add this line
    }
}
  • In android/app/build.gradle (I guess in latest version you don't need to add)
...
dependencies {
  ...
  implementation (name: "xwalk_core_library-23.53.589.4-arm", ext: "aar")     // <--- add this line
  implementation project(':CrosswalkWebView')                             // <--- add this line
}
  • Register package, sdd code into MainApplication.java:
import com.rafaelhovhannisyan.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 
    );
  }
 
  ......
 
}

License

MIT

Package Sidebar

Install

npm i react-native-crosswalk-do

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

71 kB

Total Files

19

Last publish

Collaborators

  • rafayel