Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Bundle java files with Qt android shared library

    Mobile and Embedded
    2
    3
    920
    Loading More Posts
    • 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.
    • M
      MajidKamali last edited by

      Hi.
      I created a library for android, written in Qt.
      This library has android specific Java file located at $$PWD/android/src/com/mylibrary/util.java
      Can I compile and bundle java files with my library?
      My actual problem is that, How can I use that library from another application calling those android functions?

      pro file contains:

      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
      DISTFILES += android/src/com/mylibrary/utils.java
      

      Thanks :)

      benlau 1 Reply Last reply Reply Quote 0
      • benlau
        benlau Qt Champions 2016 @MajidKamali last edited by

        @MajidKamali

        Example code:

        quickandroid/quickandroid.pri at master · benlau/quickandroid

        android {
            QT += androidextras
        
            QA_JAVASRC.path = /src/quickandroid
            QA_JAVASRC.files += $$PWD/java/quickandroid/SystemDispatcher.java \
                                $$PWD/java/quickandroid/QuickAndroidActivity.java
        
            INSTALLS += QA_JAVASRC
        }
        
        1 Reply Last reply Reply Quote 0
        • M
          MajidKamali last edited by

          Thank you very much :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post