[Android-development] Running/Testing Qt Quick 2.0 application on Android from Mac

Eric Feigenson eric at feigenson.net
Mon Feb 24 22:38:24 CET 2014


Yep, I did, and all seems to be well... except a crash that I may post in another e-mail.

Thanks!

-Eric

On Feb 24, 2014, at 4:33 PM, David Marceau <uticdmarceau2007 at yahoo.ca> wrote:

> On 02/24/2014 01:24 PM, Eric Feigenson wrote:
>> Thanks Eskill...
>> 
>> Could you point me to the documentation about how to pack the qml in the assets of the APK?
>> 
>> Also, it seems that if you select "Run", that Creator should be able to tell if a needed file isn't going to be sent to the Android device, and provide a warning. The error doesn't give any insight as to whether the missing file was even transferred or not.  Just my opinion...
>> 
>> Thanks again!
> 
> Someone previously mentioned you need to have a qrc file in your project.
> 1)File->New->Qt Resource file(.qrc).
> 2)Add your bitmaps, string tables, etc... to the qrc file.
> 3)For each file, also provide an alias for the source directory: i.e. /
> That makes it easier for it to be found within the .jar/apk file once it
> is packaged for deployment.
> 
> BTW Although in QT, QML is perceived as a source file, but with respect
> to ANDROID, a qml file is a resource file, since it is not a c++ nor a
> .java file.  .cpp/.java files are the only files considered as source
> files when building android applications.  That means you might need to
> put your .qml file into the .qrc with an alias / mapped to it also.
> 
> Do this and your resource file not found errors should go away.
> 
> Cheers,
> David Marceau
> http://adequatech.ca
> 613.218.7497
> 
> 
>> 
>> -Eric
>> On Feb 24, 2014, at 3:14 AM, Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt at digia.com> wrote:
>> 
>>> On 02/22/2014 04:45 AM, Eric Feigenson wrote:
>>>> W/Qt      (15783): file:///data/data/org.qtproject.example.WeightPlateQtQ/files/qml/WeightPlateQtQ/main.qml:-1 ((null)): file:///data/data/org.qtproject.example.WeightPlateQtQ/files/qml/WeightPlateQtQ/main.qml: File not found 
>>> 
>>> You need to make sure you deploy your qml files with your app, either in the assets of the APK or using qrc. I would recommend the latter, as this is a cross-platform way of including resources in your application.
>>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Android-development mailing list
>> Android-development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/android-development
>> 
> 
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development




More information about the Android-development mailing list