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. Android: Include external library with resources

Android: Include external library with resources

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 1.8k 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.
  • D Offline
    D Offline
    DanKolle
    wrote on 15 Feb 2015, 16:59 last edited by
    #1

    Hello,

    I try to add the external library android-support-v7-mediarouter which works fine for deployment when I add the JAR file to the libs folder.

    The problem is that the resources are missing. I found the following statement on the internet:

    bq. You can't just include the jars. You need to add the android.support.v7.mediarouter project as a Android Library dependency. That way, the resources from the project will get merged into your own.
    Inside the mediarouter folder run android update lib-project -p . and then you can add it as a dependency.
    http://stackoverflow.com/questions/18182535/where-do-i-find-android-support-v7-mediarouter-rattr

    I added the libs as dependencies to build.gradle but it seems they are completely ignored:
    @dependencies {
    compile 'com.android.support:support-v4:21.0.3'
    compile 'com.android.support:mediarouter-v7:21.0.3'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    }@

    bq. [echo] Resolving Dependencies for QtApp...
    [dependency] Library dependencies:
    [dependency] No Libraries

    I wonder how I would achieve the same with Qt Creator? The external libs that I can add seem to be limited to SO files.

    Thanks for any suggestions.
    Dan

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gianluca
      wrote on 15 Feb 2015, 20:26 last edited by
      #2

      Look at how to include Facebook SDK into Android Qt application:
      https://github.com/GMaxera/QtFacebook#prepare-facebook-sdk-for-android

      I think that you should do the same for your lib.

      1 Reply Last reply
      0

      1/2

      15 Feb 2015, 16:59

      • Login

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