Those line will copy Java source files to android build directory before
making apk file. In Qt Creator,  selected Android target , then build.
Check your build folder. Did it contains following files?

android-build/src/org/qtproject/qt5/android/bindings/QtActivity.java
android-build/src/org/qtproject/qt5/android/bindings/QtApplication.java
android-build/src/org/qmaxera/qtfacebook/QFacebookBinding.java

p.s If QtActivity / QtApplicaiton.java is not present, it won't able to run
on Android.

If not, could you post the file list within the build folder? (Run by
`find` command if you are running Mac/Linux) And what is your Qt and Qt
Creator version?



On 24 October 2015 at 04:39, Gianluca <[email protected]> wrote:

> Hello Ben,
> I replicate exactly what you did in your .pri … but does not work for me.
> It’s almost 4 hours that I’m trying to understand why … but I have no clue
> :-(
>
> This is my code into .pri
>
>       QA_JAVASRC.path = /src/org/gmaxera/qtfacebook/
>
>       QA_JAVASRC.files += 
> $$PWD/Android/src/org/gmaxera/qtfacebook/QFacebookBinding.java
>
>       INSTALLS += QA_JAVASRC
>
>
> Why does not work for me ?
>
> Thanks,
> Gianluca.
>
>
> Il giorno 22/ott/2015, alle ore 11:32, Ben Lau <[email protected]> ha
> scritto:
>
> Hi Gian,
>
> You may check my project on github. It is a Qt library for Android with
> Java source code. In the DEV branch, it has a native image picker written
> with Java. You could find out how to include Java source file as a library
> from the example code.
>
> https://github.com/benlau/quickandroid
>
>
> On 21 October 2015 at 22:43, Gian Maxera <[email protected]> wrote:
>
>> Hello,
>> I’m moving all my common source files into a library and share the code
>> between my Qt projects.
>> The qmake .pri file works fine … but I have problem on how to include
>> also Java source files when the target is Android.
>>
>> I found this blog:
>>
>> http://imaginativethinking.ca/what-the-heck-how-do-i-share-java-code-between-qt-android-projects/
>>
>> Is there no other alternative ??
>>
>> To qmake developers: can we make this process easier ?
>>
>> Thanks,
>> Gianluca.
>>
>>
>> _______________________________________________
>> Interest mailing list
>> [email protected]
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
>
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to