java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString

来源:3-2 SHA算法实现

androidStudy1

2017-05-11 14:06

05-11 14:04:55.898: W/dalvikvm(11817): threadid=1: thread exiting with uncaught exception (group=0x41610d58)
05-11 14:04:55.898: E/AndroidRuntime(11817): FATAL EXCEPTION: main
05-11 14:04:55.898: E/AndroidRuntime(11817): Process: com.xu.testshap, PID: 11817
05-11 14:04:55.898: E/AndroidRuntime(11817): java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString
05-11 14:04:55.898: E/AndroidRuntime(11817):     at com.xu.testshap.MainActivity.getSHA(MainActivity.java:37)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at com.xu.testshap.MainActivity.onCreate(MainActivity.java:26)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.Activity.performCreate(Activity.java:5291)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2151)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.ActivityThread.access$800(ActivityThread.java:138)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.os.Handler.dispatchMessage(Handler.java:102)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.os.Looper.loop(Looper.java:136)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at android.app.ActivityThread.main(ActivityThread.java:5095)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at java.lang.reflect.Method.invokeNative(Native Method)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at java.lang.reflect.Method.invoke(Method.java:515)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
05-11 14:04:55.898: E/AndroidRuntime(11817):     at dalvik.system.NativeStart.main(Native Method)

写回答 关注

2回答

  • botao555
    2017-05-26 17:45:52

    没有导入commons-codec jar包

    百度下:commons-codec-1.10.jar 下载下来导入就行了。

  • 自由的气息
    2017-05-22 11:53:50

    有什么问题呢?

Java实现消息摘要算法加密

Java中应用消息摘要算法进行加解密,以及他们的应用场景

25498 学习 · 37 问题

查看课程