Virus721
Virus721

Reputation: 8335

VS2015 - Referencing .so files in Android project

I have an Android project composed of a Java layer for the UI, and a C++ layer for the core of the application that contains most of the code.

These two layers are two separate Visual Studio 2015 projects/solutions, the "UI" project being a "Basic Application (Android, Gradle)" project, and the "Core" project being a "Dynamic Shared Library (Android)" generating a .so which is loaded by the Java on startup.

I would like my "UI" project to reference the "Core" project without making the C++ code accessible when openning the "UI" project.

What I have thought so far :

Is there a clean way to do what I want to do ? Thank you.

Upvotes: 0

Views: 63

Answers (1)

Daniil Vlasenko
Daniil Vlasenko

Reputation: 500

Unfortunatly, you could compile cpp project only if it's in your solution. If you want to hide your code, you should link you lib, but if you'll make changes in cpp code, you'll have to recompile it separately.

I use Android Studio, but methods is not too different. If i want to hide my cpp code and just use libs (for ex I write it in another IDE) I make script file wich runs from AS (from VS in your case, build event maybe) and build my cpp part.

But more frequently I build both parts together and only on release stage I hide my cpp part using external libs

Upvotes: 1

Related Questions