Skip to content

RafaelHovhannisyan/react-native-crosswalk-do

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published