11-08 13:36:05.108: E/AndroidRuntime(5318): java.lang.ExceptionInInitializerError 11-08 13:36:05.108: E/AndroidRuntime(5318): at java.lang.Class.newInstanceImpl(Native Method) 11-08 13:36:05.108: E/AndroidRuntime(5318): at java.lang.Class.newInstance(Class.java:1319) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1992) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.app.ActivityThread.access$600(ActivityThread.java:134) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.os.Handler.dispatchMessage(Handler.java:99) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.os.Looper.loop(Looper.java:137) 11-08 13:36:05.108: E/AndroidRuntime(5318): at android.app.ActivityThread.main(ActivityThread.java:4624) 11-08 13:36:05.108: E/AndroidRuntime(5318): at java.lang.reflect.Method.invokeNative(Native Method) 11-08 13:36:05.108: E/AndroidRuntime(5318): at java.lang.reflect.Method.invoke(Method.java:511) 11-08 13:36:05.108: E/AndroidRuntime(5318): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809) 11-08 13:36:05.108: E/AndroidRuntime(5318): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576) 11-08 13:36:05.108: E/AndroidRuntime(5318): at dalvik.system.NativeStart.main(Native Method) 11-08 13:36:05.108: E/AndroidRuntime(5318): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load iconv: findLibrary returned null 11-08 13:36:05.108: E/AndroidRuntime(5318): at java.lang.Runtime.loadLibrary(Runtime.java:365) 11-08 13:36:05.108: E/AndroidRuntime(5318): at java.lang.System.loadLibrary(System.java:535) 11-08 13:36:05.108: E/AndroidRuntime(5318): at com.fortrun.restaurant.ScanCodeActivity.<clinit>(ScanCodeActivity.java:122)
出现上述异常信息的原因是因为一定是项目中引用了外部jar包,但是没有把该jar包对应的".so"文件加上去。
解决办法:
在libs文件夹下新建一个armeabi文件夹,然后把对应的.so文件放进去,问题解决。