编辑问题以包括所需的行为、特定问题或错误以及重现问题所需的最短代码。这将有助于其他人回答这个问题。
这是我的日志
02-14 01:53:19.385: I/ActivityManager(286): START u0 {cmp=com.example.midterm2ndsem/.Order} from pid 1901
02-14 01:53:19.395: W/WindowManager(286): Failure taking screenshot for (343x201) to layer 21010
02-14 01:53:19.415: I/ActivityManager(286): START u0 {act=com.example.midterm2ndsem} from pid 1901
02-14 01:53:19.435: W/System.err(1901): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.midterm2ndsem }
02-14 01:53:19.435: W/System.err(1901): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622)
02-14 01:53:19.435: W/System.err(1901): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
02-14 01:53:19.445: W/System.err(1901): at android.app.Activity.startActivityForResult(Activity.java:3370)
02-14 01:53:19.445: W/System.err(1901): at android.app.Activity.startActivityForResult(Activity.java:3331)
02-14 01:53:19.445: W/System.err(1901): at android.app.Activity.startActivity(Activity.java:3566)
02-14 01:53:19.445: W/System.err(1901): at android.app.Activity.startActivity(Activity.java:3534)
02-14 01:53:19.445: W/System.err(1901): at com.example.midterm2ndsem.Home1$1.onClick(Home1.java:59)
02-14 01:53:19.455: W/System.err(1901): at android.view.View.performClick(View.java:4202)
02-14 01:53:19.455: W/System.err(1901): at android.view.View$PerformClick.run(View.java:17340)
02-14 01:53:19.465: W/System.err(1901): at android.os.Handler.handleCallback(Handler.java:725)
02-14 01:53:19.465: W/System.err(1901): at android.os.Handler.dispatchMessage(Handler.java:92)
02-14 01:53:19.465: W/System.err(1901): at android.os.Looper.loop(Looper.java:137)
02-14 01:53:19.475: W/System.err(1901): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-14 01:53:19.475: W/System.err(1901): at java.lang.reflect.Method.invokeNative(Native Method)
02-14 01:53:19.475: W/System.err(1901): at java.lang.reflect.Method.invoke(Method.java:511)
02-14 01:53:19.485: W/System.err(1901): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-14 01:53:19.485: W/System.err(1901): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-14 01:53:19.485: W/System.err(1901): at dalvik.system.NativeStart.main(Native Method)
02-14 01:53:20.016: E/SurfaceFlinger(36): ro.sf.lcd_density must be defined as a build property
02-14 01:53:21.735: I/Choreographer(1901): Skipped 280 frames! The application may be doing too much work on its main thread.
02-14 01:53:23.885: D/dalvikvm(1901): GC_CONCURRENT freed 191K, 10% free 2839K/3144K, paused 12ms+158ms, total 547ms
02-14 01:53:24.055: I/Choreographer(1901): Skipped 94 frames! The application may be doing too much work on its main thread.
02-14 01:53:25.725: D/dalvikvm(286): GC_CONCURRENT freed 750K, 16% free 6183K/7276K, paused 14ms+52ms, total 1141ms
02-14 01:53:29.565: D/InputEventConsistencyVerifier(1901): KeyEvent: ACTION_UP but key was not down.
02-14 01:53:29.565: D/InputEventConsistencyVerifier(1901): in android.widget.EditText{40d55bd8 VFED..CL .F....I. 487,103-537,143 #7f080001 app:id/qtytide}
02-14 01:53:29.565: D/InputEventConsistencyVerifier(1901): 0: sent at 5427887000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=5427887, downTime=5427758, deviceId=0, source=0x101 }
02-14 01:53:31.465: D/dalvikvm(487): GC_CONCURRENT freed 423K, 71% free 4009K/13652K, paused 7ms+35ms, total 522msandroid.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:53:58.225: E/ActivityThread(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:53:58.225: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:53:58.225: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:53:58.225: E/ActivityThread(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:53:58.225: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:53:58.225: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:53:58.225: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
02-14 01:53:58.225: E/ActivityThread(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
02-14 01:53:58.225: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:53:58.225: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:53:58.225: E/ActivityThread(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:53:58.225: E/ActivityThread(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:53:58.225: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:53:58.225: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:53:58.225: E/ActivityThread(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:53:58.235: E/StrictMode(594): null
02-14 01:53:58.235: E/StrictMode(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d274b0 that was originally bound here
02-14 01:53:58.235: E/StrictMode(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:53:58.235: E/StrictMode(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:53:58.235: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:53:58.235: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:53:58.235: E/StrictMode(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:53:58.235: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:53:58.235: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:53:58.235: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
02-14 01:53:58.235: E/StrictMode(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
02-14 01:53:58.235: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:53:58.235: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:53:58.235: E/StrictMode(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:53:58.235: E/StrictMode(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:53:58.235: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:53:58.235: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:53:58.235: E/StrictMode(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:53:58.235: W/ActivityManager(286): Unbind failed: could not find connection for android.os.BinderProxy@410495b8
02-14 01:53:58.257: E/ActivityThread(594): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d4fb18 that was originally bound here
02-14 01:53:58.257: E/ActivityThread(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d4fb18 that was originally bound here
02-14 01:53:58.257: E/ActivityThread(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:53:58.257: E/ActivityThread(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:53:58.257: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:53:58.257: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:53:58.257: E/ActivityThread(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:53:58.257: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:53:58.257: E/ActivityThread(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:53:58.257: E/ActivityThread(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:53:58.257: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:53:58.257: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:53:58.257: E/ActivityThread(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:53:58.276: E/StrictMode(594): null
02-14 01:53:58.276: E/StrictMode(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d4fb18 that was originally bound here
02-14 01:53:58.276: E/StrictMode(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:53:58.276: E/StrictMode(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:53:58.276: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:53:58.276: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:53:58.276: E/StrictMode(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:53:58.276: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:53:58.276: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:53:58.276: E/StrictMode(594): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
02-14 01:53:58.276: E/StrictMode(594): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
02-14 01:53:58.276: E/StrictMode(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
02-14 01:53:58.276: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:53:58.276: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:53:58.276: E/StrictMode(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:53:58.276: E/StrictMode(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:53:58.276: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:53:58.276: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:53:58.276: E/StrictMode(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:53:58.285: W/ActivityManager(286): Unbind failed: could not find connection for android.os.BinderProxy@41049d30
nativeGetEnabledTags: 0
02-14 01:54:43.105: D/ExchangeService(594): Received deviceId from Email app: null
02-14 01:54:43.105: D/ExchangeService(594): !!! deviceId unknown; stopping self and retrying
02-14 01:54:48.195: D/ExchangeService(594): !!! EAS ExchangeService, onCreate
02-14 01:54:48.215: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.215: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.225: D/ExchangeService(594): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = false
02-14 01:54:48.225: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.245: W/ActivityManager(286): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
02-14 01:54:48.255: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.255: D/ExchangeService(594): !!! EAS ExchangeService, onStartCommand, startingUp = true, running = false
02-14 01:54:48.255: W/Trace(1926): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.265: W/Trace(1926): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.325: W/Trace(1926): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.325: W/Trace(1926): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.357: D/ExchangeService(594): !!! Email application not found; stopping self
02-14 01:54:48.375: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.375: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.395: W/ActivityManager(286): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
02-14 01:54:48.405: W/Trace(594): Unexpected value from nativeGetEnabledTags: 0
02-14 01:54:48.415: E/ActivityThread(594): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40ce6300 that was originally bound here
02-14 01:54:48.415: E/ActivityThread(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40ce6300 that was originally bound here
02-14 01:54:48.415: E/ActivityThread(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:54:48.415: E/ActivityThread(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:54:48.415: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:54:48.415: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:54:48.415: E/ActivityThread(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:54:48.415: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:54:48.415: E/ActivityThread(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:54:48.415: E/ActivityThread(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:54:48.415: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:54:48.415: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:54:48.415: E/ActivityThread(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:54:48.527: E/StrictMode(594): null
02-14 01:54:48.527: E/StrictMode(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40ce6300 that was originally bound here
02-14 01:54:48.527: E/StrictMode(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:54:48.527: E/StrictMode(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:54:48.527: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:54:48.527: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:54:48.527: E/StrictMode(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:54:48.527: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:54:48.527: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:54:48.527: E/StrictMode(594): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
02-14 01:54:48.527: E/StrictMode(594): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
02-14 01:54:48.527: E/StrictMode(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
02-14 01:54:48.527: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:54:48.527: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:54:48.527: E/StrictMode(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:54:48.527: E/StrictMode(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:54:48.527: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:54:48.527: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:54:48.527: E/StrictMode(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:54:48.527: W/ActivityManager(286): Unbind failed: could not find connection for android.os.BinderProxy@40fc6168
02-14 01:54:48.546: E/ActivityThread(594): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cd0358 that was originally bound here
02-14 01:54:48.546: E/ActivityThread(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cd0358 that was originally bound here
02-14 01:54:48.546: E/ActivityThread(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:54:48.546: E/ActivityThread(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:54:48.546: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:54:48.546: E/ActivityThread(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:54:48.546: E/ActivityThread(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:54:48.546: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:54:48.546: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:54:48.546: E/ActivityThread(594): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
02-14 01:54:48.546: E/ActivityThread(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
02-14 01:54:48.546: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:54:48.546: E/ActivityThread(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:54:48.546: E/ActivityThread(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:54:48.546: E/ActivityThread(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:54:48.546: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:54:48.546: E/ActivityThread(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:54:48.546: E/ActivityThread(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:54:48.595: E/StrictMode(594): null
02-14 01:54:48.595: E/StrictMode(594): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cd0358 that was originally bound here
02-14 01:54:48.595: E/StrictMode(594): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
02-14 01:54:48.595: E/StrictMode(594): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
02-14 01:54:48.595: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1418)
02-14 01:54:48.595: E/StrictMode(594): at android.app.ContextImpl.bindService(ContextImpl.java:1407)
02-14 01:54:48.595: E/StrictMode(594): at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
02-14 01:54:48.595: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
02-14 01:54:48.595: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
02-14 01:54:48.595: E/StrictMode(594): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
02-14 01:54:48.595: E/StrictMode(594): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
02-14 01:54:48.595: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
02-14 01:54:48.595: E/StrictMode(594): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
02-14 01:54:48.595: E/StrictMode(594): at android.os.AsyncTask$2.call(AsyncTask.java:287)
02-14 01:54:48.595: E/StrictMode(594): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 01:54:48.595: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 01:54:48.595: E/StrictMode(594): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 01:54:48.595: E/StrictMode(594): at java.lang.Thread.run(Thread.java:856)
02-14 01:54:48.595: W/ActivityManager(286): Unbind failed: could not find connection for android.os.BinderProxy@40fc56d8
02-14 01:54:48.695: D/dalvikvm(594): GC_CONCURRENT freed 476K, 20% free 2472K/3068K, paused 75ms+79ms, total 265ms
法典:
public class Order extends Activity implements OnClickListener {
EditText qtymilk;
EditText qtytide;
EditText qtypaper;
EditText qtycheese;
EditText qtypotato;
TextView milk;
TextView tide;
TextView paper;
TextView cheese;
TextView potato;
TextView totalmilk;
TextView totaltide;
TextView totalpaper;
TextView totalcheese;
TextView totalpotato;
EditText discount1;
double num1, num2, prod1;
double num3, num4, prod2;
double num5, num6, prod3;
double num7, num8, prod4;
double num9, num10, prod5;
double grandt = prod1 + prod2 + prod3 + prod4 + prod5;
TextView grandtotal;
Button total;
Button summary;
Button discount;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_order);
milk = (TextView) findViewById(R.id.textView6);
tide = (TextView) findViewById(R.id.textView7);
paper = (TextView) findViewById(R.id.textView8);
cheese = (TextView) findViewById(R.id.textView9);
potato = (TextView) findViewById(R.id.textView10);
qtymilk = (EditText) findViewById(R.id.qtymilk);
qtytide = (EditText) findViewById(R.id.qtytide);
qtypaper = (EditText) findViewById(R.id.qtypaper);
qtycheese = (EditText) findViewById(R.id.qtycheese);
qtypotato = (EditText) findViewById(R.id.qtypotato);
totalmilk = (TextView) findViewById(R.id.totalmilk);
totaltide = (TextView) findViewById(R.id.totaltide);
totalpaper = (TextView) findViewById(R.id.totalpaper);
totalcheese = (TextView) findViewById(R.id.totalcheese);
totalpotato = (TextView) findViewById(R.id.totalpotato1);
total = (Button) findViewById(R.id.button1);
total.setOnClickListener((OnClickListener) this);
discount = (Button) findViewById(R.id.button2);
discount.setOnClickListener((OnClickListener) this);
summary = (Button) findViewById(R.id.button3);
summary.setOnClickListener((OnClickListener) this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.order, menu);
return true;
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.button1) {
num1 = Double.parseDouble(qtymilk.getText().toString());
num2 = Double.parseDouble(milk.getText().toString());
prod1 = num1 * num2;
totalmilk.setText(Double.toString(prod1));
num3 = Double.parseDouble(qtytide.getText().toString());
num4 = Double.parseDouble(tide.getText().toString());
prod2 = num3 * num4;
totaltide.setText(Double.toString(prod2));
num5 = Double.parseDouble(qtypaper.getText().toString());
num6 = Double.parseDouble(paper.getText().toString());
prod3 = num5 * num6;
totalpaper.setText(Double.toString(prod3));
num7 = Double.parseDouble(qtycheese.getText().toString());
num8 = Double.parseDouble(cheese.getText().toString());
prod4 = num7 * num8;
totalcheese.setText(Double.toString(prod4));
num9 = Double.parseDouble(qtypotato.getText().toString());
num10 = Double.parseDouble(potato.getText().toString());
prod5 = num9 * num10;
totalpotato.setText(Double.toString(prod5));
grandtotal.setText(Double.toString(grand4));
}
}
}
删除您的代码行double grandt = prod 1 prod 2 prod 3 prod 4 prod 5;您可以只使用一个全局变量(仅当您也需要时)。即双grandt
Rest你可以在 on 点击按钮
@Override
public void onClick(View v) {
if (v.getId() == R.id.button1) {
num1 = Double.parseDouble(qtymilk.getText().toString());
num2 = Double.parseDouble(milk.getText().toString());
double prod1 = num1 * num2; // <--------------
totalmilk.setText(Double.toString(prod1));
num3 = Double.parseDouble(qtytide.getText().toString());
num4 = Double.parseDouble(tide.getText().toString());
double prod2 = num3 * num4;
totaltide.setText(Double.toString(prod2));
num5 = Double.parseDouble(qtypaper.getText().toString());
num6 = Double.parseDouble(paper.getText().toString());
double prod3 = num5 * num6; // <---------------------
totalpaper.setText(Double.toString(prod3));
num7 = Double.parseDouble(qtycheese.getText().toString());
num8 = Double.parseDouble(cheese.getText().toString());
double prod4 = num7 * num8;
totalcheese.setText(Double.toString(prod4));
num9 = Double.parseDouble(qtypotato.getText().toString());
num10 = Double.parseDouble(potato.getText().toString());
double prod5 = num9 * num10; <---------------
totalpotato.setText(Double.toString(prod5));
double grndttl = prod1+prod2; // or whatever you want.
我会强烈考虑将您的逻辑分解为更小的、可读的方法。您也不需要将数字存储为字段。
即删除整个代码块...
double num1, num2, prod1;
double num3, num4, prod2;
double num5, num6, prod3;
double num7, num8, prod4;
double num9, num10, prod5;
double grandt = prod1 + prod2 + prod3 + prod4 + prod5;
此外,如果您解析的字符串不是Double值,则< code>Double.parseDouble将抛出< code > NumberFormatException ,因此如果您的应用程序因此而崩溃,请确保这些值是正确的数字。
下面是一个小示例,展示了您试图实现的目标
private double getTotalMilk() {
double quantity = Double.parseDouble(qtymilk.getText().toString());
double amount = Double.parseDouble(milk.getText().toString());
return quantity * amount;
}
private double getTotalTide() {
double quantity = Double.parseDouble(qtytide.getText().toString());
double amount = Double.parseDouble(tide.getText().toString());
return quantity * amount;
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.button1) {
double grandTotal = 0;
double totalMilk = getTotalMilk();
grandTotal += totalMilk;
totalmilk.setText(Double.toString(totalMilk));
double totalTide = getTotalTide();
grandTotal += totalTide;
totaltide.setText(Double.toString(totalTide));
// Repeat pattern....
grandtotal.setText(Double.toString(grandTotal));
}
}
我想获取WooCommerce中的所有产品数据(产品sku、名称、价格、库存、可用性等),我可以使用wp查询吗?
我想按价格、日期和发布年份等项目对产品进行排序。在发布年份的情况下,我做了一个分类法=发布年份 但它是不工作.我怎么能改变代码可能排序按发布年份顺序?
我正在使用此代码添加自定义属性 这个代码的结果我得到了添加只是产品属性名称没有术语值... 我找了很多,但没有得到任何答案。
我发现所有产品的数量不等于< code>home类别中的产品数量。这是因为在添加产品时,并不总是选择最大的父类别。因此,有些产品属于< code>home,而有些则不属于。 虽然我需要为类别<code>主页<code>页面显示正确数量的产品,但我在数据库中查找了包含类别的列,但在<code>ps_product</code>或<code>ps_product_lang</code>中未找到它们。
问题内容: 我想知道实时有多少用户连接到我的应用程序。我想到了要打开的会话数循环的想法,但是我找不到该怎么做的方法。如果您有另一种方法可以提出您的建议。 问题答案: 到目前为止,我发现的最佳解决方案是计算会话的创建和销毁时间。 然后在VaadinServlet init()方法中添加SessionListeners
我有以下要求:当您进行搜索时,如果没有结果,请显示活动目录版本中的所有产品。如何在Java中查询SOLR中的所有产品?是否有任何OOTB服务已经获取目录中的所有产品?