简体   繁体   中英

How to package an android native module for React Native

I wrote an android native module for a React Native app. I was wondering how would I package the module for private (ie my own apps or send them to someone to try) distribution ?

The module contains 1 native module (ReactContextBaseJavaModule) that starts an AppCombatActivity. The AppCombatActivity returns some results to the native module, then that module does some processing on the data returned and then returns it back to JS through the bridge.

Right now I am copying the activity and all its dependencies to the android directory in the React Native application and adding any Gradle dependencies to the Gradle file of React. Although this works, I don't feel it is a systematic way of packaging and installing the module.

嗨,使用此https://github.com/frostney/react-native-create-library命令行工具创建库并推送npm信息库(私有或公共)如何发布到npm- https://docs.npmjs.com /其它/开发者#创建-A-用户帐户

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM