安卓难懂难懂

2023-09-04 07:53:15 作者:被风吹过灼思

我使用的图像魔术在我的项目,我从这个 https://github.com/丁香花/ Android的ImageMagick的,编辑一些code从此之后。当我编译这个我收到此错误

  

11月二号至27日:37:05.329:E / AndroidRuntime(339):java.lang.ExceptionInInitializerError

在这里最终MagickImage IMG =新MagickImage(新的imageinfo(/ SD卡/ image.jpeg));这

  

11月二号至27日:37:05.329:E / AndroidRuntime(339):由:java.lang.UnsatisfiedLinkError中:库的Andr​​oid难懂未找到   :初始化   这里的System.loadLibrary(Android的难懂);我是新来这个,请帮助我..

这是logcat的

  

11月二号至27日:37:05.329:E / AndroidRuntime(339):致命异常:主要   11月2号至27号:37:05.329:E / AndroidRuntime(339):java.lang.ExceptionInInitializerError   11月2号至27号:37:05.329:E / AndroidRuntime(339):在magick.AndroidMagickActivity.onCreate(AndroidMagickActivity.java:44)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.app.ActivityThread.access $ 2300(ActivityThread.java:125)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:2033)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.os.Handler.dispatchMessage(Handler.java:99)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.os.Looper.loop(Looper.java:123)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在android.app.ActivityThread.main(ActivityThread.java:4627)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在java.lang.reflect.Method.invokeNative(本机方法)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在java.lang.reflect.Method.invoke(Method.java:521)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:868)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在dalvik.system.NativeStart.main(本机方法)   11月2号至27号:37:05.329:E / AndroidRuntime(339):由:java.lang.UnsatisfiedLinkError中:库的Andr​​oid难懂未找到   11月2号至27号:37:05.329:E / AndroidRuntime(339):在java.lang.Runtime.loadLibrary(Runtime.java:461)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在java.lang.System.loadLibrary(System.java:557)   11月2号至27号:37:05.329:E / AndroidRuntime(339):在magick.Magick(Magick.java:41)   11月2号至27号:37:05.329:E / AndroidRuntime(339):14 ...更多

解决方案

嘿,这是初学者的一个普遍问题。该库使用了一些本地methods.Follow的下面的步骤

1)下载以下链接库 https://github.com/puelocesar/android-lib-magick

2)复制下载库的libs文件夹中的内容到你的libs文件夹

3)复制文件夹难懂和fakeawt到项目src文件夹。

这就是它现在喜欢使用它:)

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

斩空物语全民RPG 安卓斩空物语5全流程攻略

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

解决方案

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 :)