[Interest] How add an Android package to qmake project file?

Edward Sutton edward.sutton at subsite.com
Fri Apr 22 21:19:48 CEST 2016


Thank you Nuno.

I  have gradle checked since I abandoned Eclipse for Android Studio.  However, I do not understand how Gradle works.  I need to learn more about it.

-Ed

On Apr 21, 2016, at 11:38 AM, Nuno Santos <nunosantos at imaginando.pt<mailto:nunosantos at imaginando.pt>> wrote:

Eduard,

Open projects tab in Qt Creator. Click the create templates button. Check the use grade checkbox. You can then use the maven repositories as follow:


allprojects {

    repositories {

        jcenter()

        mavenCentral()

        maven { url 'http://maven.localytics.com/public'<https://urldefense.proofpoint.com/v2/url?u=http-3A__maven.localytics.com_public-27&d=CwMFAg&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=sUaG8Tc392aofLCwhs4uk7KMUSeChrY15LhR8k8NaPc&s=RFjA0O9bZaI1rPhywOR0EhllXh3KQ5JDAhudGEnrebM&e=> }

        maven { url 'https://github.com/kshoji/USB-MIDI-Driver/raw/master/MIDIDriver/snapshots'<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kshoji_USB-2DMIDI-2DDriver_raw_master_MIDIDriver_snapshots-27&d=CwMFAg&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=sUaG8Tc392aofLCwhs4uk7KMUSeChrY15LhR8k8NaPc&s=gnLrkA5tMpAcftxLlT_-YqE0mnHUoniBUr-BPfTTjyI&e=> }

    }

}


apply plugin: 'com.android.application'


dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.facebook.android:facebook-android-sdk:4.6.0'

    compile 'com.localytics.android:library:3.6+'

    compile 'jp.kshoji:midi-driver:0.1.4:@aar'

}


Nuno Santos
Founder / CEO / CTO
www.imaginando.pt<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.imaginando.pt&d=CwMFAg&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=sUaG8Tc392aofLCwhs4uk7KMUSeChrY15LhR8k8NaPc&s=pG8ZELX7usrfEZ0ad898SI461Q-Ytkm1E3mqidmIr5Q&e=>
+351 91 621 69 62

On 21 Apr 2016, at 17:34, Edward Sutton <edward.sutton at subsite.com<mailto:edward.sutton at subsite.com>> wrote:



>It's not done in the pro, it's done android-side in your grade or ant. Just do it as if it were an proper SDK Android app.

I do not know how that is done.  I build all platforms Android, iOS, windows, OS X using the qmake pro file.

I created a /libs subfolder under ANDROID_PACKAGE_SOURCE_DIR and copied the android-support-v4.jar file.

This seems to work but expect it may cause confusion when Android 7.0 is released and something breaks again.

-Ed



Sent: Thursday, April 21, 2016 at 10:35 AM
From: "Edward Sutton" <edward.sutton at subsite.com<mailto:edward.sutton at subsite.com>>
To: "Qt Interest" <interest at qt-project.org<mailto:interest at qt-project.org>>
Subject: [Interest] How add an Android package to qmake project file?
I need to add package android.support.v4.content.ContextCompat

so I can fix Android 6.0 from breaking my Qt Android app.

Can this be done in the quake project file?



android-g++ {



    message ("****************** android-g++ ***********************" )

    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/platform/android

    QT += androidextras

    QT += bluetooth



}



-Ed This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ Interest mailing list Interest at qt-project.org<mailto:Interest at qt-project.org> http://lists.qt-project.org/mailman/listinfo/interest<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.qt-2Dproject.org_mailman_listinfo_interest&d=CwMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=LboYNa6PS--mD0RzhqCHEcK0Xo1seM79yWW_-fQwE7E&s=BMWxH-7V3lSXeF9SDqCq6S1mNFpB8YeMMYudQzCgvlQ&e=>

This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest


This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160422/bd3ddfcb/attachment.html>


More information about the Interest mailing list