I/DEBUG ( 4570): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 4c545f9c Do you have any idea of what might cause this?į/libc (10953): Fatal signal 4 (SIGILL) at 0x4c545f9c (code=1), thread 10953 (.fyr) When I try to create a new Gee.HashMap with the code "data = new HashMap () " does Dalvik restart the app because of an illegal instruction. Many thing with the packages you provide works really well but I have encountered a problem that I don't understand. Let's send the program, and now, the needed image file using adb :Īdb push image.png /data/data//image.png We eventually modify it, the compile with the provided script : ImageSurface surface = new om_png (filename) Īndroid_t_source_surface (surface, pos_x, pos_y) String filename = "/data/data//image.png" The cairopng-android.vala PNG sample is interesting in that it uses an image file, supposed to be stored on the device. Re-run the previously installed Cairo application and notice the changes. Using the adb tool provided by the Android SDK, send the binary to the correct folder :Īdb push libcairo-android.so /data/data//lib/ We obtain a final libcairo-android.so binary file in this folder.Ĭonnect your Android phone/tablet to your computer. Then, in the samples folder, we modify the cairo-android.vala source code, line 38 to change the text e.g.: android_context.show_text ("My personal test !") We tell "pkg-config" to locate Android libraries in our custom pathĮxport PKG_CONFIG_PATH=/opt/android/lib/pkgconfig We will compile sample source files, found in this project archive : Tar xfvj cairo-1.10.2-android-static_\(TARNYKO\).tar.bz2) Tar xfvj glib-2.28.1-android-static_\(TARNYKO\).tar.bz2 Mv cairo-1.10.2-android-static_\(TARNYKO\).tar.bz2 /opt/android Mv glib-2.28.1-android-static_\(TARNYKO\).tar.bz2 /opt/android (and extract them to a new "/opt/android" folder : Download GLib 2.28.1 and Cairo 1.10.2 (static) for Android : Configure these environment variables (either by adding these commands at the end of " /etc/profile" then rebooting, or by typing them directly in a terminal) :Įxport PATH=$PATH:/opt/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin (and install it to "/opt", making it executable : Download the agcc script (thanks to Giulio Lunati for his work) : Download the Android NDK r7b for Linux :Ī2 (61.3 Mb) Once copied and installed on the device, we can run it. (PS : the targeted phone/tablet needs to be "rooted")įirst install an Android application, which will be acting as a host for our code : We will create one, which will use Cairo to draw shapes, text and pictures in an Android canvas. We explained in a previous article that it was possible to run a Vala program under Android. Objectives : draw lines, text and images under Android with the Cairo library and the Vala language.Ĭairo is a 2D vector-oriented graphical library it is mostly known for being at the foundation of the cross-platform GTK toolkit.
0 Comments
Leave a Reply. |