Hi guys:

I have used the asynctask in my code in Android 2.3.6.

It crashed when I new a class, but it is fine in Android 4.x.

Does anyone have any solutions? Thanks

*myTask =new GetDataFromServer(); // It crashed here.*
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


04-20 22:44:43.140: I/System.out(27696): Sending WAIT chunk
04-20 22:44:43.140: W/ActivityThread(27696): Application yaafeng.sport.yfapp1 
is waiting for the debugger on port 8100...
04-20 22:44:43.310: I/dalvikvm(27696): Debugger is active
04-20 22:44:43.340: I/System.out(27696): Debugger has connected
04-20 22:44:43.340: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:43.540: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:43.740: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:43.940: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:44.150: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:44.340: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:44.540: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:44.750: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:44.950: I/System.out(27696): waiting for debugger to settle...
04-20 22:44:45.160: I/System.out(27696): debugger has settled (1428)
04-20 22:44:45.370: D/dalvikvm(27696): GC_EXTERNAL_ALLOC freed 48K, 49% free 
2769K/5379K, external 0K/0K, paused 87ms
04-20 22:44:45.720: D/dalvikvm(27696): GC_EXTERNAL_ALLOC freed 17K, 48% free 
2821K/5379K, external 426K/1286K, paused 44ms
04-20 22:44:46.080: D/CLIPBOARD(27696): Hide Clipboard dialog at Starting 
input: finished by someone else... !
04-20 22:44:56.700: W/dalvikvm(27696): VFY: unable to resolve exception class 
61 (Landroid/os/NetworkOnMainThreadException;)
04-20 22:44:56.700: W/dalvikvm(27696): VFY: unable to find exception handler at 
addr 0x85
04-20 22:44:56.700: W/dalvikvm(27696): VFY:  rejected 
Lyaafeng/sport/yfapp1/MainActivity$GetDataFromServer;.doInBackground 
([Ljava/lang/String;)Ljava/lang/String;
04-20 22:44:56.700: W/dalvikvm(27696): VFY:  rejecting opcode 0x0d at 0x0085
04-20 22:44:56.700: W/dalvikvm(27696): VFY:  rejected 
Lyaafeng/sport/yfapp1/MainActivity$GetDataFromServer;.doInBackground 
([Ljava/lang/String;)Ljava/lang/String;
04-20 22:44:56.700: W/dalvikvm(27696): Verifier rejected class 
Lyaafeng/sport/yfapp1/MainActivity$GetDataFromServer;
04-20 22:45:25.920: W/dalvikvm(27696): threadid=1: thread exiting with uncaught 
exception (group=0x4001e578)
04-20 22:45:25.970: E/AndroidRuntime(27696): FATAL EXCEPTION: main
04-20 22:45:25.970: E/AndroidRuntime(27696): java.lang.VerifyError: 
yaafeng.sport.yfapp1.MainActivity$GetDataFromServer
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
yaafeng.sport.yfapp1.MainActivity$3.onClick(MainActivity.java:271)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
android.view.View.performClick(View.java:2585)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
android.view.View$PerformClick.run(View.java:9299)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
android.os.Handler.handleCallback(Handler.java:587)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
android.os.Handler.dispatchMessage(Handler.java:92)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
android.os.Looper.loop(Looper.java:130)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
android.app.ActivityThread.main(ActivityThread.java:3770)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
java.lang.reflect.Method.invokeNative(Native Method)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
java.lang.reflect.Method.invoke(Method.java:507)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
04-20 22:45:25.970: E/AndroidRuntime(27696):    at 
dalvik.system.NativeStart.main(Native Method)
04-20 22:45:27.980: I/dalvikvm(27696): threadid=4: reacting to signal 3
04-20 22:45:27.990: I/dalvikvm(27696): Wrote stack traces to 
'/data/anr/traces.txt'

Reply via email to