- Home /
Importing Multiple Unity Project as a library inside Android Project
I have exported Unity Project as Android Project. later I have converted them into android libraries. for this conversion I am following below link:
https://medium.com/@davidbeloosesky/embedded-unity-within-android-app-7061f4f473a
now I want to load those different libraries on click of different buttons inside Android Project. when I run the project, the output of the project should be while clicking on seprate buttons, it should load separate Unity Project (which I have imported as a library inside Android Project). instead of this output, the project results specifically any single library.
for e.g. button_1 should load library_1 and button_2 should load library_2, but instead of this output, the output which I am getting is either library_1 is loaded on clicking of any buttons or library_2 is loaded on clicking of any buttons. Unity version that I am using is 2017.3 and Android Studio 2.3.3.
I did the same. Tried to load 2 Unity pjts as Android libraries. I get this error when I try to upload and run the project on the device: Error:Program type already present: bitter.jnibridge.JNIBridge$a I wish someone will find a solution or work-around to this...
Hey tried removing unity jar from any of your one project I had the same issue. I had 2 unity project exported as android. Then I turned one into a AAR library and imported the aar file in the other unity android exported project then I faced the same issue that you described. So, I just removed the unity jar file from libs folder and it worked. But facing the same issue that is asked above button press opening the same unity scene no matter which button is getting pressed.
Hey have found out a way to do this. I also tried the same thing and getting the same behavior on both button press the same unity scene is getting open. I am either getting this or getting this error "Program type already present: com.unity3d.player.Camera2Wrapper" because both unity projects import the unity jar file.
Answer by unity_0c_XV8OvptKpNw · Mar 11, 2019 at 04:51 PM
@MichalisGratsias I too did the same, but i am getting manifest merger errors. https://stackoverflow.com/questions/54418955/manifest-merger-failed-when-adding-multiple-unity-game-as-library Can you post your Manifest which would help us solve the issues.
Answer by MichalisGratsias · Mar 14, 2019 at 10:53 AM
@unity_0c_XV8OvptKpNw Sorry, I don't have that manifest anymore.
Your answer
![](https://koobas.hobune.stream/wayback/20220612151957im_/https://answers.unity.com/themes/thub/images/avi.jpg)