JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q56464F
  • License MIT

Crosswalk Webview for React Native Android

Package Exports

  • react-native-crosswalk

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-crosswalk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-crosswalk-webview

Installation

Inside your react-native project run

$ npm install --save react-native-crosswalk

Add it to your android project

In android/setting.gradle

...
include ':CrosswalkWebView', ':app'
project(':CrosswalkWebView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-crosswalk')

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

...
dependencies {
  ...
    compile (name: "xwalk_core_library-17.46.448.10", ext: "aar")    // <--- add this line
    compile project(':CrosswalkWebView')    // <--- add this line
}

Register Module (in MainActivity.java)

...
import com.atomix.react.crosswalk.webview.CrosswalkWebViewPackage;    // <--- add this line 
 
public class MainActivity extends ReactActivity {
  ......
 
  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new CrosswalkWebViewPackage(this)    // <--- add this line 
    );
  }
 
  ......
 
}

License

MIT