[announce] PySide for Android (using Necessitas)

298 views
Skip to first unread message

Thomas Perl

unread,
Jul 7, 2011, 11:18:40 AM7/7/11
to andro...@googlegroups.com
Hi,

I've been working on getting PySide (LGPL'd Python bindings to Qt, see
http://pyside.org/) to work on Android this week, using the Py4A
project and Necessitas. I've collected the results on this page:

http://thp.io/2011/pyside-android/

Some remarks/problems that I ran into:

* Qt Creator does not allow me to put libraries into libs.xml - they
get overwritten (and deleted) when building the project (I've manually
fixed this by editing libs.xml by hand and copying the shared
libraries in there after having built the project, and then rebuilding
the APK without Qt Creator using "ant install" in the "android/"
folder of my project)
* The libraries downloaded by Ministro are different from the
libraries in the Necessitas SDK (the dynamic linker in the emulator
had problems that were fixed when I overwrote the Ministro libraries
with the (stripped) libraries from the Necessitas SDK) - is this a
known problem and will it be fixed?
* If the library downloads in Ministro are interrupted/incomplete for
some reason, it will act as if the library was downloaded (but
applications trying to use the libraries will fail) - manually
deleting the affected incomplete files fixes the problem and causes
Ministro to redownload the files
* QtGui on Android does not support QSound (at least I had problems
when building PySide) - is this a known problem?
* Also QtOpenGL does not seem to be properly supported - is this
being worked on, or is this out of scope?

Looking forward to your feedback and suggestions. I'd also be happy to
hear your opinion about the current way of packaging, and if it could
be made easier, etc..

By the way: Are there plans to support Qt Mobility + its declarative
components, so I can import QtMultimediaKit in QML and use the Audio
and Video elements?

Thanks,
Thomas

ravi nooka

unread,
Aug 8, 2011, 7:25:24 AM8/8/11
to andro...@googlegroups.com
"The libraries downloaded by Ministro are different from the
libraries in the Necessitas SDK (the dynamic linker in the emulator
had problems that were fixed when I overwrote the Ministro libraries
with the (stripped) libraries from the Necessitas SDK) - is this a
known problem and will it be fixed?"


I am facing the same problem in my device. When i run the application in emulator using local libraries it runs perfectly, but when i run from the device it is not running?

Any one else facing the same problem?

thanks,
ravi nooka

Adrià Cereto Massagué

unread,
May 8, 2012, 5:31:49 AM5/8/12
to andro...@googlegroups.com
Hi,

I would like to help improve the current state of PySide for Android.

I've been trying to build it with ndk r8, latest necessitas, PySide 1.1.1 and python from https://github.com/kivy/python-for-android
I've applied your patches manually, but I'm stuck with problems with the cross-compilation:

[ 29%] Built target apiextractor
[ 30%] Generating testabstractmetaclass.moc
Scanning dependencies of target testabstractmetaclass
[ 31%] Building CXX object ApiExtractor/tests/CMakeFiles/testabstractmetaclass.dir/testabstractmetaclass.cpp.o
Linking CXX executable testabstractmetaclass
../../tests/libapiextractor.a(graph.cpp.o): In function `global constructors keyed to graph.cpp':
graph.cpp:(.text._GLOBAL__I_graph.cpp+0x10): undefined reference to `std::ios_base::Init::Init()'
graph.cpp:(.text._GLOBAL__I_graph.cpp+0x34): undefined reference to `std::ios_base::Init::~Init()'
../../tests/libapiextractor.a(graph.cpp.o): In function `Graph::dump() const':
graph.cpp:(.text._ZNK5Graph4dumpEv+0x38): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)'

And a lot more of undefined references.
If I can't sort that out I might try first to build it using the old versions of everything, then gradually updating things.
I don't have much experience with neither cmake nor android development, so the odds are that my toolchain file
is the culprit, so I'll look into it.

I'm open to suggestions or ideas.

Regards,

Adrià

El dijous 7 de juliol de 2011 17:18:40 UTC+2, Thomas Perl va escriure:

Alex Susu

unread,
Jul 24, 2012, 2:47:39 PM7/24/12
to andro...@googlegroups.com
  Hello, all.
    First of all, a lot of thanks to Thomas for  the great work and info at http://thp.io/2011/pyside-android/ .
    Thomas mentioned in his email: "Are there plans to support Qt Mobility + its declarative
components, so I can import QtMultimediaKit in QML and use the Audio
and Video elements?"
    I tried yesterday to import the QtMobility PySide module, it doesn't find it. I use the following simple code: 
      import QtMobility 
   but got error:
    Traceback (most recent call last):
      File "/sdcard/main.py", line ..., in <module>
        import QtMobility
    ImportError: No module named QtMobility 

   Was anybody able to use QtMobility under PySide (Thomas said we need to build the  QtMobility bindings for PySide).

  Regards,
     Alex

Adrià Cereto Massagué

unread,
Jul 25, 2012, 3:58:35 AM7/25/12
to andro...@googlegroups.com
IIRC, QtMobility was not included in the bindings that were built for android. I haven't tried it, but it may just build adapting the instructions to build the other modules.

2012/7/24 Alex Susu <alex....@gmail.com>



--
Adrià Cereto Massagué
Ph.D Student
Nutrigenomics Research Group
Biochemistry and Biotechnology Department
Building N4, Campus Sescelades
Universitat Rovira i Virgili
Tarragona, Catalonia

Languages: Català, Español, English, Français, Deutsch, Português

Nota importante | Important Notice

Reply all
Reply to author
Forward
0 new messages