Home > Software design >  Can I combine two android studio project into a single project
Can I combine two android studio project into a single project

Time:01-26

I am new to programing. I am currently working on a project A, the project requires some function from project B. project A used flutter as a main display, Whereas project B is completely coded in Kotlin. My initial plan was to used Method Channel to set up a channel from flutter to Kotlin, and copy the codes from project B to project A. However, project B code is too "entangled" and very hard to separate the function I needed. is there a simpler way to combine the 2 project as one? if so, could you explain the process in detail or share the resource Another this is, If I manage to combine the 2 projects, how would I used the function and valuable in project B (how to declare it in project A)

p.s. project B is a demo project I downloaded from github ( a video calling app )

I tried searching on the internet, but not much came of it. However, there is a similar question posted on this website, but but a bit different from my problem and the answer is a bit confusing for someone who just started app development 2 weeks ago

CodePudding user response:

You must write FLutter codes for a Flutter project. You must use native codes to be able to use the device's functionalities. If you want to transfer screenshots etc. it won't work. You should write the screenshots from scratch with flutter..

CodePudding user response:

few options to consider for a combine project:

  1. Create a library module in Project B: You can create a new library module within Project B and move the code you need into this module. Then, you can include this library in Project A as a dependency. This way, you can use the code from Project B in Project A without having to copy and paste it.

  2. Use a package manager: You can use a package manager like Gradle or Maven to manage dependencies between the two projects. This allows you to include the code from Project B as a dependency in Project A, without having to copy and paste it.

  3. Use a plugin: If the functionality you need from Project B is small and self-contained, you can create a plugin for it. This allows you to include the functionality as a separate package in Project A, without having to copy and paste it.

  4. Rebuild the functionality: If the functionality you need is small and you are comfortable with it, you can try to rebuild the functionality in Project A.

  • Related