3
votes

i am using image magic in my project, i get it from this https://github.com/lilac/Android-ImageMagick , after editing some code from this. when i compile this i am getting this error

02-27 11:37:05.329: E/AndroidRuntime(339): java.lang.ExceptionInInitializerError

here final MagickImage img = new MagickImage(new ImageInfo("/sdcard/image.jpeg")); and this

02-27 11:37:05.329: E/AndroidRuntime(339): Caused by: java.lang.UnsatisfiedLinkError: Library android-magick not found : init
here System.loadLibrary("android-magick"); i am new to this please help me..

this is the logcat

02-27 11:37:05.329: E/AndroidRuntime(339): FATAL EXCEPTION: main 02-27 11:37:05.329: E/AndroidRuntime(339): java.lang.ExceptionInInitializerError 02-27 11:37:05.329: E/AndroidRuntime(339): at magick.AndroidMagickActivity.onCreate(AndroidMagickActivity.java:44) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.os.Handler.dispatchMessage(Handler.java:99) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.os.Looper.loop(Looper.java:123) 02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.main(ActivityThread.java:4627) 02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.reflect.Method.invokeNative(Native Method) 02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.reflect.Method.invoke(Method.java:521) 02-27 11:37:05.329: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 02-27 11:37:05.329: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 02-27 11:37:05.329: E/AndroidRuntime(339): at dalvik.system.NativeStart.main(Native Method) 02-27 11:37:05.329: E/AndroidRuntime(339): Caused by: java.lang.UnsatisfiedLinkError: Library android-magick not found 02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.Runtime.loadLibrary(Runtime.java:461) 02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.System.loadLibrary(System.java:557) 02-27 11:37:05.329: E/AndroidRuntime(339): at magick.Magick.(Magick.java:41) 02-27 11:37:05.329: E/AndroidRuntime(339): ... 14 more

3
got the same problem. Does anyone find a solution? - goodm

3 Answers

11
votes

Hey this is a common problem for Beginners. The library uses some of the Native methods.Follow the below steps

  1. Download the library below link https://github.com/puelocesar/android-lib-magick

  2. Copy the contents of the libs folder of the downloaded library to your libs folder

  3. Copy the Folders "magick" and "fakeawt" to your projects src folder.

thats it now enjoy using it :)

3
votes

i've just ported ImageMagick on android, this time with all CPU architectures, if they don't suit you. Rebuild with ndk-build simple. All here https://github.com/tapaulo/Android-ImageMagick