Package Exports
- maxleap-react-native
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 (maxleap-react-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MaxLeap-SDK
集成 SDK
安装 SDK
npm install --save maxleap-react-native
集成 iOS 环境
集成 Android 环境
修改父工程目录下的
build.gradle
文件(与settings.gradle
位于同级目录)。repositories { flatDir{ dirs '../../node_modules/maxleap-react-native/dist/android' } }
修改应用目录下的
build.gradle
文件,添加以下依赖dependencies { compile(name:'maxleap-react-native', ext:'aar') }
修改工程的主 Activity 文件。
private MaxLeap maxLeap; @Override protected void onCreate(Bundle savedInstanceState) { // 确保在 super.onCreate() 之前调用以下代码 maxLeap = new MaxLeap(this, APP_ID, API_KEY); super.onCreate(savedInstanceState); } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), maxLeap.getReactPackage() ); }