Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Android - creating a qt lib that uses jni call
Forum Updated to NodeBB v4.3 + New Features

Qt Android - creating a qt lib that uses jni call

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 168 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    laran
    wrote on last edited by
    #1

    I am trying to figure out how to create a stand alone qt library that makes jni calls. I want the library to be stand alone, in a self-contained source tree. I am not sure where to place the java files for the linking to work out properly.

    I have tried different solutions although most often end up in a runtime error where the java package is not found.
    So far I have found out that if I declare ANDROID_PACKAGE_SOURCE_DIR = $$PRO_FILE_PWD/android-sources in my main.pro, and put all my .java files under $$PRO_FILE_PWD/android-sources/src I am all good. When I write all .java files I refer to the ones used both in the main application as well as the ones from the library.

    Now, since I want my lib to be stand alone, is there a way to keep my .java files in the library structure and include that as a "subdir" directory to my main application?

    Is there a way to make gradle look in multiple directories for source code? or is there some other clever solution to this?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved