Didn't manage to run example

Asked by Thomas Lüdecke

Hey there,
your Android Lib seems to be exactly what i'm looking for.
I followed all steps to get the sample project run. But it doesn't work and i dont have any idea what is wrong.
I'm using Windows with cygwin and checked out your branch directory. I tryed to run the BuildAPK.sh with:
sh BuildAPK.sh --update-android-project bin
But then an error occurs: ./BuildAPK.sh: line 26: android: command not found

So i tryed to create a Project from existing source with Eclipse.
But when i try to run the project in my Emulator it crashes:

This is my StackTrace:

07-13 13:02:16.315: ERROR/AndroidRuntime(397): FATAL EXCEPTION: main
07-13 13:02:16.315: ERROR/AndroidRuntime(397): java.lang.ExceptionInInitializerError
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at com.toolkits.libsvgandroid.HelloSvg.onCreate(HelloSvg.java:32)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.os.Handler.dispatchMessage(Handler.java:99)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.os.Looper.loop(Looper.java:123)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at android.app.ActivityThread.main(ActivityThread.java:3683)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at java.lang.reflect.Method.invokeNative(Native Method)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at java.lang.reflect.Method.invoke(Method.java:507)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at dalvik.system.NativeStart.main(Native Method)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load svgandroid: findLibrary returned null
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at java.lang.Runtime.loadLibrary(Runtime.java:429)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at java.lang.System.loadLibrary(System.java:554)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): at com.toolkits.libsvgandroid.HelloSvgCanvas.<clinit>(HelloSvgCanvas.java:40)
07-13 13:02:16.315: ERROR/AndroidRuntime(397): ... 14 more

Is there something i forgot to set up, or isn't it possible to create the project that way over eclipse???

thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
libsvg-android Edit question
Assignee:
No assignee Edit question
Solved by:
pltxtra
Solved:
Last query:
Last reply:
Revision history for this message
pltxtra (pltxtra) said :
#1

Hi,

I recommend that you try another alternative library first:

http://code.google.com/p/svg-android/

Revision history for this message
Thomas Lüdecke (thomasluedecke90) said :
#2

i already tried it, but this lib is not matching my requirements.
the lib you refered to crashes all the time because it is not able to read the tags which are standard in svg graphics.
thats why i'd like to try this library now

Revision history for this message
Best pltxtra (pltxtra) said :
#3

I have not used, and I do not plan to use Eclipse; so all I can do is refer to how I do in Ubuntu Linux to build this.

Assuming you have the SDK and NDK installed and your paths include the Android tools (like android and adb):

Get a copy of the source:
bzr branch lp:libsvg-android

Enter directory:
cd libsvg-android

List available android targets:
android list targets

Prepare the project to build for a selected target:
./BuildAPK.sh --update-android-project <target identifier>

   EXAMPLE: ./BuildAPK.sh --update-android-project android-10

To build the example application, and install on a running emulator:
./BuildAPK.sh -ie

To build the example application, and install on a connected real device:
./BuildAPK.sh -id

Revision history for this message
Thomas Lüdecke (thomasluedecke90) said :
#4

Thanks pltxtra, that solved my question.