在我MessageDigest.getInstance("SHA-1")
用来获取 SHA1 的应用程序中,它可以在 android 2.3 中成功运行,但它不能在 android 4.0 中运行,它会显示以下异常:
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: android.security.MessageDigest
at com.screenshare.email.Utility.getConsistentDeviceId(Utility.java:597)
at com.screenshare.exchange.SyncManager.getDeviceIdInternal(SyncManager.java:1079)
at com.screenshare.exchange.SyncManager.getDeviceId(SyncManager.java:1045)
at com.screenshare.exchange.SyncManager.onCreate(SyncManager.java:1813)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
at android.app.ActivityThread.access$1600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
谁能解释一下这个案子?