Skip to content

Integrate in Android Studio #3245

Answered by lpugin
NorayrMovsisyan asked this question in Q&A
Discussion options

You must be logged in to vote

You can try this:

  1. Create a new project with C++ Native
  2. Checkout the Verovio repository in the ./app/src/main/cpp directory
  3. Add the following to the CMakeLists.txt generated by Android Studio:
# Build Verovio as a library
set(BUILD_AS_LIBRARY ON)
# Add the subdirectory with the Verovio CMakeLists.txt
add_subdirectory(./verovio/cmake)
# Add the inlude paths with the Verovio files
file(GLOB VRV_INCLUDES "./verovio/include/*" "./verovio/libmei/*")
include_directories(${VRV_INCLUDES})
# Link the Verovio library
target_link_libraries(myapplication verovio)

A minimal example would look like:

#include <jni.h>
#include <string>

#include "toolkit.h"

extern "C" JNIEXPORT jstring JNICALL
Java_co…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lpugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants