You are probably running on an older version of the platform where the class does not exist.
On Mon, Apr 11, 2011 at 8:16 PM, Sarath Krishna <[email protected]>wrote: > Hi, > > When I tried to use the TrafficStats class of android.net package in > the following way > > > long sent = TrafficStats.getMobileRxBytes(); > > I got the below error > > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): > java.lang.NoClassDefFoundError: android.net.TrafficStats > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > org.gps.History.get3GSentInfo(History.java:150) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at org.gps.GPSsens > $6.handleMessage(GPSsens.java:804) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > android.os.Handler.dispatchMessage(Handler.java:99) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > android.os.Looper.loop(Looper.java:123) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > android.app.ActivityThread.main(ActivityThread.java:4363) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > java.lang.reflect.Method.invokeNative(Native Method) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > java.lang.reflect.Method.invoke(Method.java:521) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > com.android.internal.os.ZygoteInit > $MethodAndArgsCaller.run(ZygoteInit.java:862) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) > 04-11 22:12:06.449: ERROR/AndroidRuntime(2916): at > dalvik.system.NativeStart.main(Native Method) > > can anyone please tell me why this error occurred. Thanks in advance. > > sarath > > -- > 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 > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

