I'm trying to decode base64 with the following code

String base64name = hmm[1];
byte[] b = Base64.decode(base64name, Base64.DEFAULT);


However, I get this error:


05-18 11:35:03.320: WARN/dalvikvm(3782): threadid=3: thread exiting
with uncaught exception (group=0x4001dc20)
05-18 11:35:03.324: ERROR/AndroidRuntime(3782): Uncaught handler:
thread main exiting due to uncaught exception
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):
java.lang.NoClassDefFoundError: android.util.Base64
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
com.coolfone.hmm.onCreate(hmm.java:60)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2459)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2512)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.os.Looper.loop(Looper.java:123)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
android.app.ActivityThread.main(ActivityThread.java:4363)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:862)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
05-18 11:35:03.589: ERROR/AndroidRuntime(3782):     at
dalvik.system.NativeStart.main(Native Method)



Any ideas why?


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to