Android:java.lang.NoSuchMethodError:没有静态方法decodeHex

时间:2018-10-14 14:05:29

标签: android apache android-studio

我在项目中从.jar添加了一个外部库,每当我运行该应用程序时,它都会引发此错误:

  

致命异常:主要                     工艺:com.enginious.snowblossom,PID:17643                     java.lang.NoSuchMethodError:没有静态方法encodeHex(Ljava / lang / String;)[B Lorg / apache / commons / codec / binary / Hex;或其超级类(在/system/framework/org.apache.http.legacy.boot.jar中显示“ org.apache.commons.codec.binary.Hex”的声明)                         在snowblossom.lib.SnowFieldInfo。(SnowFieldInfo.java:28)                         在snowblossom.lib.NetworkParamsTestnet.genSnowFields(NetworkParamsTestnet.java:32)                         在snowblossom.lib.NetworkParams。(NetworkParams.java:22)                         在snowblossom.lib.NetworkParamsTestnet。(NetworkParamsTestnet.java:13)                         在snowblossom.lib.NetworkParams.loadFromConfig(NetworkParams.java:96)                         在snowblossom.client.SnowBlossomClient。(SnowBlossomClient.java:281)                         在com.enginious.snowblossom.MainActivity.onCreate(MainActivity.java:32)                         在android.app.Activity.performCreate(Activity.java:7183)                         在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)                         在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)                         在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)                         在android.app.ActivityThread.-wrap11(未知来源:0)                         在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1696)                         在android.os.Handler.dispatchMessage(Handler.java:105)                         在android.os.Looper.loop(Looper.java:164)                         在android.app.ActivityThread.main(ActivityThread.java:6944)                         在java.lang.reflect.Method.invoke(本机方法)                         在com.android.internal.os.Zygote $ MethodAndArgsCaller.run(Zygote.java:327)                         在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

org.Appache.Commons包含在我添加的库中,但仍会引发此错误。我需要有关此问题的指导。谢谢。

0 个答案:

没有答案