Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
110 views
in Technique[技术] by (71.8m points)

android - Create module from React Native application containing native code

I am trying to create a reusable module based on this project. The project consists of a unity project which exports a react native module, some typescript, and native code. My goal is to package all of this into a single module. I am still new to react native but after hours of searching I cant find out what the structure of my module should look like.

I have tried various approaches but the template I have mainly been following is this one. For this specific project I'm having issues linking the exported unity project:

Project with path ':UnityExport' could not be found in project ':myapp'
  1. It would be very helpful if somebody could tell me how to fix this linking issue, in settings.gradle I have added these lines:
include ":UnityExport"
project(':UnityExport').projectDir = new File(rootProject.projectDir, './UnityExport')

And in build.gradle, I added this to the dependencies:

implementation project(':UnityExport') 
  1. Does the structure of the template match with the goal I have in mind?
question from:https://stackoverflow.com/questions/65847222/create-module-from-react-native-application-containing-native-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...