Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by bdama · Feb 05, 2018 at 01:38 PM · androidlibraries

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.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MichalisGratsias · Mar 29, 2018 at 09:07 PM 0
Share

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...

avatar image unity_xrPBQ-2zcfd-DA MichalisGratsias · Mar 15, 2019 at 06:19 AM 0
Share

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.

avatar image unity_xrPBQ-2zcfd-DA · Mar 14, 2019 at 09:53 AM 0
Share

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.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by MichalisGratsias · Mar 14, 2019 at 10:53 AM

@unity_0c_XV8OvptKpNw Sorry, I don't have that manifest anymore.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

164 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error when using a NDK built Library which depend on another one in a Unity project 0 Answers

Gradle file for Unity 2 Answers

Which C# libraries are compatible with Unity Android or iOS 1 Answer

Runtime Library supports Oculus Go 0 Answers

Adding features, eg online multiplayer android/ios 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges