简体   繁体   中英

Extend external .jar functionality with library in Android Studio

High level description: In Android Studio, I'd like to create/add a library that extends an external jar, but am confused about how to link the two in a project.

Detailed Description: I'm using LibGDX for Android game development, which I can successfully include and use in AS. I found this library which extends the LibGDX.jar functionality to interface with Google Cardboard, which is awesome! I've found a couple of examples regarding adding new libraries to AS projects here , but AS doesn't find a valid eclipse ADT/gradle project when I point to any of those folders.

What would be cool to know is how to create a library (with package name com.badlogic.gdx.backends.android) that extends the LibGDX.jar (which has the package com.badlogic.gdx).

Thanks for the help!

You may be able to package the external jar into the library. This would be done by using the oracle documentation on this. Extract the external jar then update the library with the contents of it. After doing so you can import the combined library into Android studio.

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