I would like to add an external 'C' library, and by external I mean that is in a completely different folder (not even where I store the android studio projects).
I tried to follow this answer: Android Studio: Adding a library outside of the project root , but I do not know why this is not working (probably because this example is about two projects being in the same folder).
This is my code in gradle.settings, but it keeps saying that it cannot find the library.
include ':ItemData'
project(':ItemData').projectDir = new File(settingsDir, '../Sandbox/Software/RABBIT/UVTrolley/Ver01.6/ItemData')
Just in case you may ask the "../" should be the C: and this is my code in build.gradle(app)
compile project(':ItemData')
and finally this is what I got in my Cmake
add_library(ItemData SHARED
${SRC_DIR}../Sandbox/Software/RABBIT/UVTrolley/Ver01.6/ItemData/itemdata.c)
target_link_libraries(ItemData)
So what am I doing wrong?
Here the error message:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve project :ItemData.
Required by:
project :app
> No matching configuration of project :ItemData was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
- None of the consumable configurations have attributes.