nothing is impossible!一切皆有可能!

发布新日志

  • Android monkey 资料(转自博客园)

    2011-12-20 18:01:59

    一、为什么要用Monkey 测试?
     
    简单在说就是象猴子一样乱点,为了测试软件的稳定性,健壮性。号称最快速有效的方法。有时候运行相同系列的测试,即使是复杂的测试,但是以相同的顺序和路径,即使一遍又一遍地运行也很少机会能发现内存和资源使用的bug。而此时猴子就比人更有效了。
     
    简介
     
    Monkey是一个命令行工具 ,可以运行在模拟器里或实际设备中。它向系统发送伪随机的用户事件流,实现对正在开发的应用程序进行压力测试。Monkey包括许多选项,它们大致分为四大类:
     
    · 基本配置 选项,如设置尝试的事件数量。
     
    · 运行约束选项,如设置只对单独的一个包进行测试。
     
    · 事件类型和频率。
     
    · 调试选项。
     
    在Monkey运行的时候,它生成事件,并把它们发给系统。同时,Monkey还对测试中的系统进行监测,对下列三种情况进行特殊处理:
     
    · 如果限定了Monkey运行在一个或几个特定的包上,那么它会监测试图转到其它包的操作,并对其进行阻止。
     
    · 如果应用程序崩溃或接收到任何失控异常 ,Monkey将停止并报错。
     
    · 如果应用程序产生了应用程序不响应(application not responding)的错误,Monkey将会停止并报错。
     
    按照选定的不同级别的反馈信息,在Monkey中还可以看到其执行过程报告和生成的事件。
     
    二、怎么用的?
     
    首先用一个最简单的例子分析:
    //p参数: 表示指定测试的程序
    //v参数: 表示查看monkey生成的一些详细的随机的事件名
    //数字100: 表示测试事件数为100
    monkey -p com.example.android.apis  -v -v -v 100
     
     
    结果如下:
     
    :Monkey: seed=0 count=100
     
     
    :AllowPackage: com.example.android.apis
    :IncludeCategory: android.intent.category.LAUNCHER
    :IncludeCategory: android.intent.category.MONKEY
     
    //各种事件所占的比例。
    //各数字分别表示:
    [--pct-touch PERCENT]
    [--pct-motion PERCENT]
    [--pct-trackball PERCENT]
    [--pct-syskeys PERCENT]
    [--pct-nav PERCENT]
    [--pct-majornav PERCENT]
    [--pct-appswitch PERCENT]
    [--pct-flip PERCENT]
    [--pct-anyevent PERCENT]
    // Event percentages:
    //   0: 15.0%
    //   1: 10.0%
    //   2: 15.0%
    //   3: 25.0%
    //   4: 15.0%
    //   5: 2.0%
    //   6: 2.0%
    //   7: 1.0%
    //   8: 15.0%
    :Switch:
     
    //表示跳转到com.example.android.apis 里面的ApiDemos这一个Activity里。
    #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.example.android.apis/.ApiDemos;end
     
    //允许此Intent跳转,
        // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.apis/.ApiDemos } in package com.example.android.apis
     
    //发送的一些动作,如点击按下,点击放开,移动。
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    :Sending Pointer ACTION_UP x=0.0 y=0.0
    :Sending Pointer ACTION_DOWN x=207.0 y=282.0
    :Sending Pointer ACTION_UP x=189.0 y=289.0
    :Sending Pointer ACTION_DOWN x=95.0 y=259.0
    :Sending Pointer ACTION_UP x=95.0 y=259.0
    :Sending Pointer ACTION_DOWN x=295.0 y=223.0
    :Sending Pointer ACTION_UP x=290.0 y=213.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=3.0
    :Sending Pointer ACTION_MOVE x=0.0 y=-5.0
     
    //拒绝此跳转,因为它是跳转到非它自己的包的Activity,本测试中是指写测试它程序所在的包,此跳转是跳出本程序,进入到桌面。
        // Rejecting start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] cmp=com.android.launcher/.Launcher } in package com.android.launcher
     
    //继续发送动作。
    :Sending Pointer ACTION_DOWN x=74.0 y=201.0
    :Sending Pointer ACTION_UP x=74.0 y=201.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-2.0
    :Sending Pointer ACTION_UP x=0.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    Events injected: 100
     
    //丢弃的,键=0,指针=0,轨迹球=0,翻转=0。
    :Dropped: keys=0 pointers=0 trackballs=0 flips=0
     
    //网络统计经过时间为4202ms,其中4202ms是用于在手机上的,0ms用于无线网络上,没有连接的时间为0ms。
    ## Network stats: elapsed time=4202ms (4202ms mobile, 0ms wifi, 0ms not connected)
     
    //monkey测试完成。
    // Monkey finished
     
    从例子中可以看出,该程序在这次测试中没有问题,若程序出现问题终端将打印出异常供程序员查找错误。
     
     
     
    以下是monkey命令行的一些参数:
    -p:所在测试的包,可以是一个也可以是多个 如 monkey -p com.androd.sms -p com.androd.explorer
    -c:如果用此参数指定了一个或几个类别,Monkey将只允许系统启动被这些类别中的某个类别列出的Activity。如果不指定任何类别,Monkey将选择下列类别中列出的Activity: Intent.CATEGORY_LAUNCHER或Intent.CATEGORY_MONKEY。要指定多个类别,需要使用多个-c选项,每个-c选项只能用于一个类别。
    -ignore-crash:当应用程序崩溃或发生任何失控异常时,Monkey将停止运行。如果设置此选项,Monkey将继续向系统发送事件,直到计数完成。
    -ignore-timeouts:通常,当应用程序发生任何超时错误(如“Application Not Responding”对话框)时,Monkey将停止运行。如果设置此选项,Monkey将继续向系统发送事件,直到计数完成。
    -ignore-security-exceptions:通常,当应用程序发生许可错误(如启动一个需要某些许可的Activity)时,Monkey将停止运行。如果设置了此选项,Monkey将继续向系统发送事件,直到计数完成。
    -monitor-native-crashes:监视并报告Android系统中本地代码的崩溃事件。如果设置了–kill-process-after-error,系统将停止运行。
    -kill-process-after-error:如果程序出现错误,monkey将结束此程序进程。
    -hprof:设置此项,将在monkey事件序列之前和之后立即生成profilling报告。这将会在data/misc中生成大文件(约5mb)所以要小心使用它。
    -pct-touch:调整触摸事件的百分比(触摸事件是一个down-up事件,它发生在屏幕的某单一位置)。
    -pct-motion:动作事件的百分比(动作事件由屏幕上某处的一个down事件、一系列的随机事件和一个up事件组成)。
    -pct-trackball:调整轨迹事件的百分比(轨迹事件由一个或几个随机移动组成,有时还伴随着点击)。
    -pct-syskeys:调整系统按键事件的百分比(这些按键通常被保留,由系统使用,如home,back,start call,end call及音量控制)。
    -pct-nav 调整基本导航事件的百分比(导航事件来自方向输入设备的up/down/left/right组成)。
    -pct-majornav:调整“主要”导航事件的百分比(这些导航事件通常引发图形界面中的动作,如:5-way键盘的中间按键、回退按键、菜单按键)
    -pct-appswitch:调整启动Activity的百分比。在随机间隔里,Monkey将执行一个startActivity()调用,作为最大程度覆盖包中全部Activity的一种方法。
    -pct-anyevent:调整启动Activity的百分比。它包罗了所有其它的事件类型,如:按键,其它不常用的设备按钮。
    -pct-flip:
    –wait-dbg:停止执行中的Monkey,直到有调试器和它相连接。
    –dbg-no-events:设置此选项,Monkey将执行初始启动,进入到一个测试Activity,然后不会再进一步生成事件。为了得到最佳结果,把它与-v、一个或几个包约束、以及一个保持Monkey运行30秒或更长时间的非零值联合起来,从而提供一个环境,可以监视应用程序所调用的包之间的转换。
    -setup:
    -f:
    -port: 为monkey开启专用端口。此时只monkey不会帮你乱点击,而此时你自己就是一只monkey了,在你乱点的时候,monkey会输出你点击后回馈的信息。如果你打完命令之后模拟器上没有启动你所要启动的包,你需要自己启动,但是你只能启动你-p中指定的那几个包。ctrl+c中断。
    --throttle :当事件起效时等待的毫秒数。
    -s:随机数生成器的seed值。如果用相同的seed值再次运行monkey,它将生成相同的事件序列。
    COUNT:要发送的事件数。
    usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
                  [-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
                  [--ignore-crashes] [--ignore-timeouts]
                  [--ignore-security-exceptions] [--monitor-native-crashes]
                  [--kill-process-after-error] [--hprof]
                  [--pct-touch PERCENT] [--pct-motion PERCENT]
                  [--pct-trackball PERCENT] [--pct-syskeys PERCENT]
                  [--pct-nav PERCENT] [--pct-majornav PERCENT]
                  [--pct-appswitch PERCENT] [--pct-flip PERCENT]
                  [--pct-anyevent PERCENT]
                  [--wait-dbg] [--dbg-no-events]
                  [--setup scriptfile] [-f scriptfile [-f scriptfile] ...]
                  [--port port]
                  [-s SEED] [-v [-v] ...] [--throttle MILLISEC]
                  COUNT
     
     
     
     
    Monkey测试结果 :
    # monkey -p wfh.LessonTable -v -v -v 200
    :Monkey: seed=0 count=200
    :AllowPackage: wfh.LessonTable
    :IncludeCategory: android.intent.category.LAUNCHER
    :IncludeCategory: android.intent.category.MONKEY
    // Selecting main activities from category android.intent.category.LAUNCHER
    //   - NOT USING main activity com.android.browser.BrowserActivity (from package com.android.browser)
    //   - NOT USING main activity com.android.music.MusicBrowserActivity (from package com.android.music)
    //   - NOT USING main activity com.android.contacts.DialtactsActivity (from package com.android.contacts)
    //   - NOT USING main activity com.android.contacts.DialtactsContactsEntryActivity (from package com.android.contacts)
    //   - NOT USING main activity com.android.mms.ui.ConversationList (from package com.android.mms)
    //   - NOT USING main activity com.android.spare_parts.SpareParts (from package com.android.spare_parts)
    //   - NOT USING main activity com.android.camera.Camera (from package com.android.camera)
    //   - NOT USING main activity com.android.alarmclock.AlarmClock (from package com.android.alarmclock)
    //   - NOT USING main activity com.android.settings.Settings (from package com.android.settings)
    //   - NOT USING main activity com.android.camera.GalleryPicker (from package com.android.gallery)
    //   - NOT USING main activity com.android.email.activity.Welcome (from package com.android.email)
    //   - NOT USING main activity com.example.android.apis.ApiDemos (from package com.example.android.apis)
    //   - NOT USING main activity com.android.calculator2.Calculator (from package com.android.calculator2)
    //   - NOT USING main activity com.android.customlocale.CustomLocaleActivity (from package com.android.customlocale)
    //   - NOT USING main activity com.android.development.Development (from package com.android.development)
    //   - NOT USING main activity com.myactivity.MyActivity (from package com.myactivity)
    //   + Using main activity wfh.LessonTable.MainTable (from package wfh.LessonTable)
    //   - NOT USING main activity wfh.rss.MainRSS (from package wfh.rss)
    // Selecting main activities from category android.intent.category.MONKEY
    //   - NOT USING main activity com.android.launcher.Launcher (from package com.android.launcher)
    //   - NOT USING main activity com.android.settings.ManageApplications (from package com.android.settings)
    //   - NOT USING main activity com.android.settings.RunningServices (from package com.android.settings)
    // Seeded: 0
    // Event percentages:
    //   0: 15.0%
    //   1: 10.0%
    //   2: 15.0%
    //   3: 25.0%
    //   4: 15.0%
    //   5: 2.0%
    //   6: 2.0%
    //   7: 1.0%
    //   8: 15.0%
    :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=wfh.LessonTable/.MainTable;end
        // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=wfh.LessonTable/.MainTable } in package wfh.LessonTable
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
    Sleeping for 0 milliseconds  //------------------------------------用--throttle来设置一个起效的事件发生后时延时。
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=0.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0 //-------------移动事件!!!
    :Sending Pointer ACTION_MOVE x=-2.0 y=4.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=1.0
    :Sending Pointer ACTION_MOVE x=0.0 y=-2.0
    :Sending Pointer ACTION_DOWN x=0.0 y=0.0
    :Sending Pointer ACTION_UP x=0.0 y=0.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 64    // KEYCODE_EXPLORER
    :SendKey (ACTION_UP): 64    // KEYCODE_EXPLORER
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 23    // KEYCODE_DPAD_CENTER
    :SendKey (ACTION_UP): 23    // KEYCODE_DPAD_CENTER
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 91    // KEYCODE_MUTE
        // Allowing start of Intent { cmp=wfh.LessonTable/.EditLesson } in package wfh.LessonTable
    :SendKey (ACTION_UP): 91    // KEYCODE_MUTE
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=207.0 y=282.0
    :Sending Pointer ACTION_MOVE x=210.0 y=277.0
    :Sending Pointer ACTION_MOVE x=204.0 y=283.0
    :Sending Pointer ACTION_MOVE x=205.0 y=278.0
    :Sending Pointer ACTION_MOVE x=199.0 y=278.0
    :Sending Pointer ACTION_MOVE x=199.0 y=287.0
    :Sending Pointer ACTION_MOVE x=194.0 y=295.0
    :Sending Pointer ACTION_MOVE x=198.0 y=290.0
    :Sending Pointer ACTION_MOVE x=197.0 y=286.0
    :Sending Pointer ACTION_MOVE x=189.0 y=289.0
    :Sending Pointer ACTION_UP x=189.0 y=289.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 56    // KEYCODE_PERIOD
    :SendKey (ACTION_UP): 56    // KEYCODE_PERIOD
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=95.0 y=259.0
    :Sending Pointer ACTION_UP x=95.0 y=259.0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=295.0 y=223.0
    :Sending Pointer ACTION_MOVE x=291.0 y=223.0
    :Sending Pointer ACTION_MOVE x=291.0 y=218.0
    :Sending Pointer ACTION_MOVE x=284.0 y=215.0
    :Sending Pointer ACTION_MOVE x=284.0 y=206.0
    :Sending Pointer ACTION_MOVE x=285.0 y=205.0
    :Sending Pointer ACTION_MOVE x=290.0 y=213.0
    :Sending Pointer ACTION_UP x=290.0 y=213.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=-5.0 y=3.0
    :Sending Pointer ACTION_MOVE x=3.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=2.0
    :Sending Pointer ACTION_MOVE x=3.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=1.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=-5.0
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=0.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=4.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=3.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=3.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=-3.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=-1.0
    :SendKey (ACTION_DOWN): 3    // KEYCODE_HOME
    :SendKey (ACTION_UP): 3    // KEYCODE_HOME
        // Rejecting start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] cmp=com.android.launcher/.Launcher } in package com.android.launcher
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=74.0 y=201.0
    :Sending Pointer ACTION_UP x=74.0 y=201.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 23    // KEYCODE_DPAD_CENTER
    :SendKey (ACTION_UP): 23    // KEYCODE_DPAD_CENTER
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=3.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=0.0
    :Sending Pointer ACTION_MOVE x=3.0 y=2.0
    :Sending Pointer ACTION_MOVE x=0.0 y=0.0
    :Sending Pointer ACTION_MOVE x=4.0 y=3.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=1.0
    :Sending Pointer ACTION_DOWN x=0.0 y=0.0
    :Sending Pointer ACTION_UP x=0.0 y=0.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
        // activityResuming(wfh.LessonTable)
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
    Sleeping for 0 milliseconds ??????
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=4.0 y=0.0
        // Sending event #100
    :Sending Pointer ACTION_MOVE x=3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=3.0 y=1.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=3.0
    :Sending Pointer ACTION_MOVE x=1.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=0.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=1.0
    :Sending Pointer ACTION_MOVE x=2.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=2.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-3.0
    :Sending Pointer ACTION_MOVE x=4.0 y=0.0
    :Sending Pointer ACTION_MOVE x=0.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=2.0 y=-2.0
    :SendKey (ACTION_DOWN): 22    // KEYCODE_DPAD_RIGHT
    :SendKey (ACTION_UP): 22    // KEYCODE_DPAD_RIGHT
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 53    // KEYCODE_Y
    :SendKey (ACTION_UP): 53    // KEYCODE_Y
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 24    // KEYCODE_VOLUME_UP
    :SendKey (ACTION_UP): 24    // KEYCODE_VOLUME_UP
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=149.0 y=150.0
    :Sending Pointer ACTION_MOVE x=149.0 y=151.0
    :Sending Pointer ACTION_MOVE x=152.0 y=158.0
    :Sending Pointer ACTION_MOVE x=148.0 y=162.0
    :Sending Pointer ACTION_MOVE x=148.0 y=156.0
    :Sending Pointer ACTION_MOVE x=152.0 y=149.0
    :Sending Pointer ACTION_MOVE x=155.0 y=146.0
    :Sending Pointer ACTION_MOVE x=150.0 y=138.0
    :Sending Pointer ACTION_MOVE x=155.0 y=142.0
    :Sending Pointer ACTION_MOVE x=162.0 y=150.0
    :Sending Pointer ACTION_UP x=162.0 y=150.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
        // Allowing start of Intent { cmp=wfh.LessonTable/.AWeekLesson } in package wfh.LessonTable
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=0.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=0.0
    :Sending Pointer ACTION_MOVE x=2.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=2.0 y=2.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=-1.0
    :SendKey (ACTION_DOWN): 19    // KEYCODE_DPAD_UP
    :SendKey (ACTION_UP): 19    // KEYCODE_DPAD_UP
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=134.0 y=239.0
    :Sending Pointer ACTION_UP x=134.0 y=239.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 4    // KEYCODE_BACK
    :SendKey (ACTION_UP): 4    // KEYCODE_BACK
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 23    // KEYCODE_DPAD_CENTER
        // activityResuming(wfh.LessonTable)
    :SendKey (ACTION_UP): 23    // KEYCODE_DPAD_CENTER
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 22    // KEYCODE_DPAD_RIGHT
    :SendKey (ACTION_UP): 22    // KEYCODE_DPAD_RIGHT
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 19    // KEYCODE_DPAD_UP
    :SendKey (ACTION_UP): 19    // KEYCODE_DPAD_UP
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 19    // KEYCODE_DPAD_UP
    :SendKey (ACTION_UP): 19    // KEYCODE_DPAD_UP
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 23    // KEYCODE_DPAD_CENTER
    :SendKey (ACTION_UP): 23    // KEYCODE_DPAD_CENTER
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=118.0 y=37.0
    :Sending Pointer ACTION_MOVE x=119.0 y=33.0
    :Sending Pointer ACTION_UP x=119.0 y=33.0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=297.0 y=358.0
    :Sending Pointer ACTION_MOVE x=289.0 y=363.0
    :Sending Pointer ACTION_MOVE x=284.0 y=369.0
    :Sending Pointer ACTION_UP x=284.0 y=369.0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=258.0 y=403.0
    :Sending Pointer ACTION_MOVE x=249.0 y=398.0
    :Sending Pointer ACTION_MOVE x=258.0 y=393.0
    :Sending Pointer ACTION_MOVE x=258.0 y=402.0
    :Sending Pointer ACTION_MOVE x=263.0 y=395.0
    :Sending Pointer ACTION_MOVE x=266.0 y=399.0
    :Sending Pointer ACTION_MOVE x=273.0 y=403.0
    :Sending Pointer ACTION_UP x=273.0 y=403.0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=-5.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=1.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=1.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=2.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-3.0
    :Sending Pointer ACTION_MOVE x=2.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-5.0 y=2.0
    :Sending Pointer ACTION_MOVE x=0.0 y=0.0
     
    当测试到ACTION_MOVE x=0.0 y=0.0这个动作时,发生了FC(Force Close)错误,以下为输出错误信息。同时在LogCat里面也有错误输出,而且LogCat里面的错误信息更为详细,在实际的测试中应该结合两者输出的信息进行调试程序。
     
    // CRASH: wfh.LessonTable (pid 1973)
    // Short Msg: java.lang.NullPointerException
    // Long Msg: java.lang.NullPointerException
    // Build Label: android:generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys
    // Build Changelist: 35983
    // Build Time: 1273161972
    // ID:
    // Tag: AndroidRuntime
    // java.lang.NullPointerException:
    //   at android.widget.TabHost.dispatchKeyEvent(TabHost.java:279)
    //   at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    //   at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    //   at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    //   at android.widget.TabHost.dispatchKeyEvent(TabHost.java:275)
    //   at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    //   at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    //   at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    //   at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1655)
    //   at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1102)
    //   at android.app.Activity.dispatchKeyEvent(Activity.java:2038)
    //   at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1631)
    //   at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2368)
    //   at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2338)
    //   at android.view.ViewRoot.handleMessage(ViewRoot.java:1641)
    //   at android.os.Handler.dispatchMessage(Handler.java:99)
    //   at android.os.Looper.loop(Looper.java:123)
    //   at android.app.ActivityThread.main(ActivityThread.java:4363)
    //   at java.lang.reflect.Method.invokeNative(Method.java:-2)
    //   at java.lang.reflect.Method.invoke(Method.java:521)
    //   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    //   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    //   at dalvik.system.NativeStart.main(NativeStart.java:-2)
     
    ** Monkey aborted due to error.
    Events injected: 190
    :Dropped: keys=0 pointers=11 trackballs=0 flips=0
    ## Network stats: elapsed time=27954ms (27954ms mobile, 0ms wifi, 0ms not connected)
    ** System appears to have crashed at event 190 of 200 using seed 0
    #
     
     
    开始monkey测试时android的LogCat输出的信息:
     
    11-01 08:52:53.712: DEBUG/AndroidRuntime(2077): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
    11-01 08:52:53.742: DEBUG/AndroidRuntime(2077): CheckJNI is ON
    11-01 08:52:54.453: DEBUG/AndroidRuntime(2077): --- registering native functions ---
    11-01 08:52:55.542: DEBUG/ddm-heap(2077): Got feature list request
    11-01 08:52:59.533: INFO/ActivityManager(53): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=wfh.LessonTable/.MainTable }
    11-01 08:53:00.842: INFO/ActivityManager(53): Displayed activity wfh.LessonTable/.MainTable: 1266 ms (total 1266 ms)
    11-01 08:53:03.123: DEBUG/dalvikvm(1973): GC freed 7524 objects / 507616 bytes in 246ms
    11-01 08:53:03.173: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.213: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c585c0 on MO that has not been deactivated or closed
    11-01 08:53:03.213: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.213: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.233: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.252: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c57f98 on MO that has not been deactivated or closed
    11-01 08:53:03.252: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.252: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.263: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.293: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c57970 on MO that has not been deactivated or closed
    11-01 08:53:03.293: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.303: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.323: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.323: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c57330 on MO that has not been deactivated or closed
    11-01 08:53:03.333: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.353: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.363: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.403: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c45330 on MO that has not been deactivated or closed
    11-01 08:53:03.403: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.403: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.423: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.433: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c44d08 on MO that has not been deactivated or closed
    11-01 08:53:03.443: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.443: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.453: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.483: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c446c8 on MO that has not been deactivated or closed
    11-01 08:53:03.483: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.503: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.523: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.563: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c26288 on MO that has not been deactivated or closed
    11-01 08:53:03.572: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.572: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.622: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.642: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c25cb0 on MO that has not been deactivated or closed
    11-01 08:53:03.642: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.662: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.662: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.722: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c256d8 on MO that has not been deactivated or closed
    11-01 08:53:03.722: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.722: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.732: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.752: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c250e8 on MO that has not been deactivated or closed
    11-01 08:53:03.752: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.762: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:03.902: INFO/dalvikvm(1973): Uncaught exception thrown by finalizer (will be discarded):
    11-01 08:53:03.902: INFO/dalvikvm(1973): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43c1e780 on MO that has not been deactivated or closed
    11-01 08:53:03.902: INFO/dalvikvm(1973):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    11-01 08:53:03.912: INFO/dalvikvm(1973):     at dalvik.system.NativeStart.run(Native Method)
    11-01 08:53:04.247: WARN/KeyCharacterMap(1973): No keyboard for id 0
    11-01 08:53:04.252: WARN/KeyCharacterMap(1973): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    11-01 08:53:04.762: INFO/ActivityManager(53): Starting activity: Intent { cmp=wfh.LessonTable/.EditLesson }
    11-01 08:53:05.233: WARN/WindowManager(53): No window to dispatch pointer action 0
    11-01 08:53:05.533: WARN/WindowManager(53): No window to dispatch pointer action 1
    11-01 08:53:06.782: INFO/ActivityManager(53): Displayed activity wfh.LessonTable/.EditLesson: 1637 ms (total 1637 ms)
    11-01 08:53:09.623: WARN/ActivityManager(53): Launch timeout has expired, giving up wake lock!
    11-01 08:53:09.682: WARN/ActivityManager(53): Activity idle timeout for HistoryRecord{43d3ab48 wfh.LessonTable/.MainTable}
    11-01 08:53:12.662: INFO/ActivityManager(53): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/.Launcher }
    11-01 08:53:15.433: INFO/NotificationService(53): enqueueToast pkg=wfh.LessonTable callback=android.app.ITransientNotification$Stub$Proxy@43d5b308 duration=1
    11-01 08:53:15.513: INFO/System.out(1973): UpdateRecord
    11-01 08:53:19.353: INFO/NotificationService(53): enqueueToast pkg=android callback=android.widget.Toast$TN@43ced790 duration=0
    11-01 08:53:19.752: WARN/InputManagerService(53): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43d2bab0
    11-01 08:53:20.752: INFO/ActivityManager(53): Starting activity: Intent { cmp=wfh.LessonTable/.AWeekLesson (has extras) }
    11-01 08:53:21.852: INFO/ActivityManager(53): Displayed activity wfh.LessonTable/.AWeekLesson: 1028 ms (total 1028 ms)
    11-01 08:53:27.093: DEBUG/AndroidRuntime(1973): Shutting down VM
    11-01 08:53:27.113: WARN/dalvikvm(1973): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
     
     
     
    以下为LogCat输出的错误信息,在以下的信息中首先从自己的包中找错误,如果没有自己的包的话就再找发生错误的包的第一个发生了异常。由错误提示可以看出很大的可能是因为TabHost引发的异常。经过查看代码发现是由于TabHost的编写不规范,TabHost与其中一个view放在了一起,在 monkey测试做滚球上下滚动时当滚到TabHost时就发生了异常了。所以把TabHost与Activity分开写就不会出现些问题了。
     
     
     
    11-01 08:53:27.113: ERROR/AndroidRuntime(1973): Uncaught handler: thread main exiting due to uncaught exception
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973): java.lang.NullPointerException
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.widget.TabHost.dispatchKeyEvent(TabHost.java:279)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.widget.TabHost.dispatchKeyEvent(TabHost.java:275)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1655)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1102)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.app.Activity.dispatchKeyEvent(Activity.java:2038)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1631)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2368)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2338)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1641)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.os.Handler.dispatchMessage(Handler.java:99)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.os.Looper.loop(Looper.java:123)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at android.app.ActivityThread.main(ActivityThread.java:4363)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at java.lang.reflect.Method.invokeNative(Native Method)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at java.lang.reflect.Method.invoke(Method.java:521)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    11-01 08:53:27.133: ERROR/AndroidRuntime(1973):     at dalvik.system.NativeStart.main(Native Method)
    11-01 08:53:27.163: INFO/Process(53): Sending signal. PID: 1973 SIG: 3
    11-01 08:53:27.173: INFO/dalvikvm(1973): threadid=7: reacting to signal 3
    11-01 08:53:27.173: ERROR/dalvikvm(1973): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
    11-01 08:53:27.622: INFO/AndroidRuntime(2077): AndroidRuntime onExit calling exit(190)
    11-01 08:53:33.702: WARN/ActivityManager(53): Launch timeout has expired, giving up wake lock!
    11-01 08:53:33.733: WARN/ActivityManager(53): Activity idle timeout for HistoryRecord{43d3ab48 wfh.LessonTable/.MainTable}
    11-01 08:53:41.173: DEBUG/dalvikvm(1334): GC freed 62 objects / 3120 bytes in 2419ms
    11-01 08:53:43.742: WARN/ActivityManager(53): Activity destroy timeout for HistoryRecord{43dc5028 wfh.LessonTable/.AWeekLesson}
     
    四、总结:
    在monkey测试中常用的命令组合有:
    1、monkey -p com.yourpackage -v 500//简单的输出测试的信息。
    2、monkey -p com.yourpackage -v -v -v 500 //以深度为三级输出测试信息。
    3、monkey -p com.yourpackage --port 端口号 -v//为测试分配一个专用的端口号,不过这个命令只能输出跳转的信息及有错误时输出信息。
    4、monkey -p com.yourpackage -s 数字 -v 500//为随机数的事件序列定一个值,若出现问题下次可以重复同样的系列进行排错。
    5、monkey -p com.yourpackage -v --throttle 3000 500//为每一次执行一次有效的事件后休眠3000毫秒。
     
    五、附录:
    以下内容为android系统中的keycode值,在以后的调试中会经常需要查询:
    KEYCODE_UNKNOWN=0;
    KEYCODE_SOFT_LEFT=1;
    KEYCODE_SOFT_RIGHT=2;
    KEYCODE_HOME=3;
    KEYCODE_BACK=4;
    KEYCODE_CALL=5;
    KEYCODE_ENDCALL=6;
    KEYCODE_0=7;
    KEYCODE_1=8;
    KEYCODE_2=9;
    KEYCODE_3=10;
    KEYCODE_4=11;
    KEYCODE_5=12;
    KEYCODE_6=13;
    KEYCODE_7=14;
    KEYCODE_8=15;
    KEYCODE_9=16;
    KEYCODE_STAR=17;      //-----------------------------------
    KEYCODE_POUND=18;
    KEYCODE_DPAD_UP=19;
    KEYCODE_DPAD_DOWN=20;
    KEYCODE_DPAD_LEFT=21;
    KEYCODE_DPAD_RIGHT=22;
    KEYCODE_DPAD_CENTER=23;
    KEYCODE_VOLUME_UP=24;
    KEYCODE_VOLUME_DOWN=25;
    KEYCODE_POWER=26;
    KEYCODE_CAMERA=27;
    KEYCODE_CLEAR=28;    //-----------------------------------
    KEYCODE_A=29;
    KEYCODE_B=30;
    KEYCODE_C=31;
    KEYCODE_D=32;
    KEYCODE_E=33;
    KEYCODE_F=34;
    KEYCODE_G=35;
    KEYCODE_H=36;
    KEYCODE_I=37;
    KEYCODE_J=38;
    KEYCODE_K=39;
    KEYCODE_L=40;
    KEYCODE_M=41;
    KEYCODE_N=42;
    KEYCODE_O=43;
    KEYCODE_P=44;
    KEYCODE_Q=45;
    KEYCODE_R=46;
    KEYCODE_S=47;
    KEYCODE_T=48;
    KEYCODE_U=49;
    KEYCODE_V=50;
    KEYCODE_W=51;
    KEYCODE_X=52;
    KEYCODE_Y=53;
    KEYCODE_Z=54;
    KEYCODE_COMMA=55;    //-----------------,------------------
    KEYCODE_PERIOD=56;    //-----------------.------------------
    KEYCODE_ALT_LEFT=57;
    KEYCODE_ALT_RIGHT=58;
    KEYCODE_SHIFT_LEFT=59;
    KEYCODE_SHIFT_RIGHT=60;
    KEYCODE_TAB=61;
    KEYCODE_SPACE=62;
    KEYCODE_SYM=63;
    KEYCODE_EXPLORER=64; //-----------------------------------
    KEYCODE_ENVELOPE=65;  //---------------信封--------------------
    KEYCODE_ENTER=66;   
    KEYCODE_DEL=67;
    KEYCODE_GRAVE=68;  //---------------坟墓--------------------
    KEYCODE_MINUS=69;  //---------------负--------------------
    KEYCODE_EQUALS=70;  //--------------等于(=)---------------------
    KEYCODE_LEFT_BRACKET=71;  //----------------------------
    KEYCODE_RIGHT_BRACKET=72;  //----------------------------
    KEYCODE_BACKSLASH=73;  //-------------反斜线\---------------
    KEYCODE_SEMICOLON=74;  //--------------;--------------
    KEYCODE_APOSTROPHE=75; //---------------’-------------
    KEYCODE_SLASH=76;         //--------------/?--------------
    KEYCODE_AT=77;           //------------------@---------------
    KEYCODE_NUM=78;
    KEYCODE_HEADSETHOOK=79;  //----------------------------
    KEYCODE_FOCUS=80;//*Camera*focus
    KEYCODE_PLUS=81;   //------------+----------------
    KEYCODE_MENU=82;
    KEYCODE_NOTIFICATION=83;   //----------------------------
    KEYCODE_SEARCH=84;
    KEYCODE_MEDIA_PLAY_PAUSE=85;
    KEYCODE_MEDIA_STOP=86;
    KEYCODE_MEDIA_NEXT=87;
    KEYCODE_MEDIA_PREVIOUS=88;
    KEYCODE_MEDIA_REWIND=89;  //------------倒带----------------
    KEYCODE_MEDIA_FAST_FORWARD=90;
    KEYCODE_MUTE=91;  //-----------静音-----------------

  • Android 的monkey测试及排错步骤(转自博客园)

    2011-12-20 17:56:03

    1.  环境准备:
        1。开启eclipse,并显示到Logcat界面;
        2。开启模拟器;
        3。进入shell,准备Monkey测试;
        4。准备两把屏幕尺子(方便找到测试时找到的点及一些动作的变化);
     
    2。  开始测试:
        1。在shell中输入命令(以测试com.hskj.memo为例):monkey -p com.hskj.memo -s 100 -v -v -v 500 
        (测试com.hskj.memo包,以seed为100的随机排序<设置seed方便下次进行同样事件的测试,不过要求测试的起始位置相同,比如起始位置为桌面或者为某一个Activity的某一个状态>,测试结果为第三级别的显示,即为最详细的显示)
        2。查看结果并将结果保存(包括Monkey的输出结果及eclipse里面的输出结果):
        3。分析结果(找出并标识出重要信息):
            
     
     
     
    //-------------monkey的输出结果--------------------------
     
    # monkey -p com.hskj.memo -s 100 -v -v -v 500
    :Monkey: seed=100 count=500
    :AllowPackage: com.hskj.memo
    :IncludeCategory: android.intent.category.LAUNCHER
    :IncludeCategory: android.intent.category.MONKEY
    // Selecting main activities from category android.intent.category.LAUNCHER
    //   - NOT USING main activity com.android.settings.Settings (from package com.android.settings)
    //   - NOT USING main activity com.android.contacts.DialtactsActivity (from package com.android.contacts)
    //   - NOT USING main activity com.android.contacts.ContactsListActivity (from package com.android.contacts)
    //   - NOT USING main activity com.hskj.iphonemms.ui.ConversationList (from package com.hskj.iphonemms)
    //   - NOT USING main activity com.android.calendar.LaunchActivity (from package com.android.calendar)
    //   - NOT USING main activity com.android.deskclock.DeskClockGroupActivity (from package com.android.deskclock)
    //   - NOT USING main activity com.android.systemupdater.SystemUpdate (from package com.android.systemupdater)
    //   - NOT USING main activity com.android.camera.Camera (from package com.android.camera)
    //   - NOT USING main activity com.android.browser.BrowserActivity (from package com.android.browser)
    //   - NOT USING main activity com.android.music.MusicBrowserActivity (from package com.android.music)
    //   - NOT USING main activity com.android.email.activity.Welcome (from package com.android.email)
    //   - NOT USING main activity com.hskj.iphonecamera.GalleryPicker (from package com.hskj.iphonegallery)
    //   + Using main activity com.hskj.memo.ui.MemoMain (from package com.hskj.memo)
    //   - NOT USING main activity com.android.term.Term (from package com.android.term)
    //   - NOT USING main activity com.android.development.Development (from package com.android.development)
    //   - NOT USING main activity com.hskj.iphone.voicememor.VoiceRecordActivity (from package com.hskj.iphone.voicememor)
    //   - NOT USING main activity com.hskj.iphonecalculator.Calculator (from package com.hskj.iphonecalculator)
    // Selecting main activities from category android.intent.category.MONKEY
    //   - NOT USING main activity com.android.settings.ManageApplications (from package com.android.settings)
    //   - NOT USING main activity com.android.settings.RunningServices (from package com.android.settings)
    //   - NOT USING main activity com.hskj.iphonehome.Launcher (from package com.hskj.iphonehome)
    //   - NOT USING main activity com.android.launcher.Launcher (from package com.android.launcher)
    //   - NOT USING main activity com.android.googlesearch.GoogleSearch (from package com.android.googlesearch)
    // Seeded: 100
    // Event percentages:
    //   0: 15.0%
    //   1: 10.0%
    //   2: 15.0%
    //   3: 25.0%
    //   4: 15.0%
    //   5: 2.0%
    //   6: 2.0%
    //   7: 1.0%
    //   8: 15.0%
    :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.hskj.memo/.ui.MemoMain;end
        // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hskj.memo/.ui.MemoMain } in package com.hskj.memo
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=1.0 y=377.0
    :Sending Pointer ACTION_UP x=1.0 y=377.0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=104.0 y=178.0
    :Sending Pointer ACTION_UP x=104.0 y=178.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
        // activityResuming(com.hskj.iphonehome)
        // Rejecting resume of package com.hskj.iphonehome
        // Allowing start of Intent { act=android.intent.action.EDIT dat=content://com.hskj.provider.memo/memo/2 cmp=com.hskj.memo/.ui.MemoEdit } in package com.hskj.memo
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 23    // KEYCODE_DPAD_CENTER
    :SendKey (ACTION_UP): 23    // KEYCODE_DPAD_CENTER
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=249.0 y=141.0
    :Sending Pointer ACTION_MOVE x=258.0 y=139.0
    :Sending Pointer ACTION_MOVE x=261.0 y=138.0
    :Sending Pointer ACTION_MOVE x=260.0 y=138.0
    :Sending Pointer ACTION_MOVE x=264.0 y=134.0
    :Sending Pointer ACTION_MOVE x=269.0 y=128.0
    :Sending Pointer ACTION_MOVE x=266.0 y=136.0
    :Sending Pointer ACTION_MOVE x=274.0 y=136.0
    :Sending Pointer ACTION_MOVE x=275.0 y=132.0
    :Sending Pointer ACTION_UP x=275.0 y=132.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 28    // KEYCODE_CLEAR
    :SendKey (ACTION_UP): 28    // KEYCODE_CLEAR
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 7    // KEYCODE_0
    :SendKey (ACTION_UP): 7    // KEYCODE_0
    Sleeping for 0 milliseconds
     
     
    //---------------一般由此处开始分析(即跳转到发生错误的那个Activity前的一个Activity的最后一个动作)-----------------
     
     
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.hskj.memo/.ui.MemoMain;end
        // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hskj.memo/.ui.MemoMain } in package com.hskj.memo
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=-4.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=2.0 y=1.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=1.0 y=2.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=2.0 y=3.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=4.0
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 5    // KEYCODE_CALL
    :SendKey (ACTION_UP): 5    // KEYCODE_CALL
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
        // Rejecting start of Intent { act=android.intent.action.CALL_BUTTON cmp=com.android.contacts/.DialtactsActivity } in package com.android.contacts
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=281.0 y=162.0
    :Sending Pointer ACTION_UP x=281.0 y=162.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 78    // KEYCODE_NUM
    :SendKey (ACTION_UP): 78    // KEYCODE_NUM
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 22    // KEYCODE_DPAD_RIGHT
    :SendKey (ACTION_UP): 22    // KEYCODE_DPAD_RIGHT
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 7    // KEYCODE_0
    :SendKey (ACTION_UP): 7    // KEYCODE_0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=306.0 y=55.0
    :Sending Pointer ACTION_UP x=306.0 y=55.0
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 60    // KEYCODE_SHIFT_RIGHT
    :SendKey (ACTION_UP): 60    // KEYCODE_SHIFT_RIGHT
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=1.0 y=1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=4.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-5.0
    :SendKey (ACTION_DOWN): 22    // KEYCODE_DPAD_RIGHT
    :SendKey (ACTION_UP): 22    // KEYCODE_DPAD_RIGHT
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_MOVE x=2.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=2.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=4.0
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
    Sleeping for 0 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=99.0 y=260.0
    :Sending Pointer ACTION_UP x=99.0 y=260.0
    Sleeping for 0 milliseconds
    :Sending Pointer ACTION_DOWN x=12.0 y=179.0
    :Sending Pointer ACTION_UP x=12.0 y=179.0
     
     
    //-----------------重点:出错错误信息(往上查找出现错误前执行的事件,一般从出现错误的Activity之前的一个Activity的最后一个动作查找)-----------------
     
     
    // CRASH: com.hskj.memo (pid 430)
    // Short Msg: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    // Long Msg: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    // Build Label: android:cyanogen/cyanogen/generic/:2.1-update1/ECLAIR/eng.root.20101029.152625:eng/test-keys
    // Build Changelist: -1
    // Build Time: 1288337269
    // ID:
    // Tag: AndroidRuntime
    // android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    //   at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
    //   at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
    //   at android.app.Activity.startActivityForResult(Activity.java:2749)
    //   at android.app.Activity.startActivity(Activity.java:2855)
    //   at com.hskj.memo.ui.MemoEdit.onClick(MemoEdit.java:183)
    //   at android.view.View.performClick(View.java:2364)
    //   at android.view.View.onTouchEvent(View.java:4198)
    //   at android.widget.TextView.onTouchEvent(TextView.java:6543)
    //   at android.view.View.dispatchTouchEvent(View.java:3728)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
    //   at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
    //   at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
    //   at com.hskj.iphone.app.IphoneMenuBottomPopActivity.dispatchTouchEvent(IphoneMenuBottomPopActivity.java:104)
    //   at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
    //   at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
    //   at android.os.Handler.dispatchMessage(Handler.java:99)
    //   at android.os.Looper.loop(Looper.java:123)
    //   at android.app.ActivityThread.main(ActivityThread.java:4363)
    //   at java.lang.reflect.Method.invokeNative(Method.java:-2)
    //   at java.lang.reflect.Method.invoke(Method.java:521)
    //   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    //   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    //   at dalvik.system.NativeStart.main(NativeStart.java:-2)
     
    ** Monkey aborted due to error.
    Events injected: 92
    :Dropped: keys=0 pointers=1 trackballs=0 flips=0
    ## Network stats: elapsed time=15962ms (15962ms mobile, 0ms wifi, 0ms not connected)
    ** System appears to have crashed at event 92 of 500 using seed 100
    #
     
     
    //------------------eclipse中LogCat的输出结果-----------------------------------
     
     
    11-04 02:03:51.544: DEBUG/dalvikvm(314): GC freed 4448 objects / 297008 bytes in 80ms
    11-04 02:03:51.544: INFO/dalvikvm(314): Uncaught exception thrown by finalizer (will be discarded):
    11-04 02:03:51.544: INFO/dalvikvm(314): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43a326f8 on panel that has not been deactivated or closed
    11-04 02:03:51.554: INFO/dalvikvm(314):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:599)
    11-04 02:03:51.554: INFO/dalvikvm(314):     at dalvik.system.NativeStart.run(Native Method)
    11-04 02:03:57.534: DEBUG/dalvikvm(314): GC freed 18199 objects / 925728 bytes in 85ms
    11-04 02:04:01.983: DEBUG/dalvikvm(314): GC freed 13953 objects / 660984 bytes in 82ms
    11-04 02:04:04.993: DEBUG/libEGL(423): Setting TLS: 0xafe43b74 to 0xac70a2ec
    11-04 02:04:05.554: DEBUG/AndroidRuntime(423): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
    11-04 02:04:05.564: DEBUG/AndroidRuntime(423): CheckJNI is ON
    11-04 02:04:06.284: DEBUG/AndroidRuntime(423): --- registering native functions ---
    11-04 02:04:06.804: DEBUG/dalvikvm(314): GC freed 12275 objects / 582016 bytes in 148ms
    11-04 02:04:06.963: DEBUG/ddm-heap(423): Got feature list request
    11-04 02:04:09.433: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hskj.memo/.ui.MemoMain }
    11-04 02:04:09.574: DEBUG/LifeCryle(314): Launcher onSaveInstanceState!
    11-04 02:04:09.574: DEBUG/LifeCryle(314): Launcher onPause!
    11-04 02:04:10.228: INFO/ActivityManager(117): Start proc com.hskj.memo for activity com.hskj.memo/.ui.MemoMain: pid=430 uid=10019 gids={}
    11-04 02:04:10.924: DEBUG/ddm-heap(430): Got feature list request
    11-04 02:04:12.914: INFO/ActivityThread(430): Publishing provider com.hskj.provider.memo: com.hskj.memo.provider.MemoProvider
    11-04 02:04:13.403: DEBUG/MemoListView(430): MemoListView(Context context, AttributeSet attrs) mMaximumVelocity:4000
    11-04 02:04:13.654: DEBUG/mListView.getChildCount()(430): mListView.getChildCount()=0
    11-04 02:04:14.014: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:14.033: DEBUG/MemoListView(430): onTouchEvent case MotionEvent.ACTION_DOWN:
    11-04 02:04:14.103: DEBUG/MemoMainListAdapter(430): formatCalendar days:0
    11-04 02:04:14.123: DEBUG/MemoMainListAdapter(430): formatCalendar days:0
    11-04 02:04:14.153: DEBUG/MemoMainListAdapter(430): formatCalendar days:0
    11-04 02:04:14.173: DEBUG/MemoMainListAdapter(430): formatCalendar days:0
    11-04 02:04:14.193: DEBUG/MemoMainListAdapter(430): formatCalendar days:0
    11-04 02:04:14.363: INFO/ActivityManager(117): Displayed activity com.hskj.memo/.ui.MemoMain: 4769 ms (total 4769 ms)
    11-04 02:04:14.373: DEBUG/MemoListView(430): onTouchEvent case MotionEvent.ACTION_UP:
    11-04 02:04:14.383: DEBUG/MemoListView(430): onTouchEvent case MotionEvent.ACTION_UP:   Math.abs(velocityX):0---Math.abs(velocityY):0
    11-04 02:04:14.434: DEBUG/MemoListView(430): onTouchEvent case MotionEvent.ACTION_DOWN:
    11-04 02:04:14.794: DEBUG/MemoListView(430): onTouchEvent case MotionEvent.ACTION_UP:
    11-04 02:04:14.803: DEBUG/MemoListView(430): onTouchEvent case MotionEvent.ACTION_UP:   Math.abs(velocityX):0---Math.abs(velocityY):0
    11-04 02:04:15.243: WARN/KeyCharacterMap(314): No keyboard for id 0
    11-04 02:04:15.253: WARN/KeyCharacterMap(314): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    11-04 02:04:15.253: DEBUG/IphoneLauncher(314): onKeyDown!
    11-04 02:04:15.403: DEBUG/LifeCryle(314): Launcher onStop!
    11-04 02:04:15.504: DEBUG/MemoProvider(430): getType uri = content://com.hskj.provider.memo/memo/2, match =2
    11-04 02:04:15.514: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.EDIT dat=content://com.hskj.provider.memo/memo/2 cmp=com.hskj.memo/.ui.MemoEdit }
    11-04 02:04:15.544: WARN/KeyCharacterMap(430): No keyboard for id 0
    11-04 02:04:15.553: WARN/KeyCharacterMap(430): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    11-04 02:04:15.734: DEBUG/dalvikvm(430): GC freed 2584 objects / 153536 bytes in 93ms
    11-04 02:04:15.834: DEBUG/LifeCryle(314): Launcher onDestroy!
    11-04 02:04:15.904: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:15.924: DEBUG/IphoneHomeLoaders(314): aborting loaders
    11-04 02:04:16.133: DEBUG/IphoneEditText(430): beforeTextChanged cancelShow()
    11-04 02:04:16.143: DEBUG/IphoneEditText(430): beforeTextChanged start: 0after: 39count: 0
    11-04 02:04:16.143: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:16.143: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 0selEnd: 0
    11-04 02:04:16.263: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:16.263: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 22selEnd: 22
    11-04 02:04:16.263: WARN/KeyCharacterMap(430): No keyboard for id 0
    11-04 02:04:16.273: WARN/KeyCharacterMap(430): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    11-04 02:04:16.464: DEBUG/IphoneEditText(430): onWindowFocusChanged
    11-04 02:04:16.484: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:16.484: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:04:16.644: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:04:16.854: INFO/ActivityManager(117): Displayed activity com.hskj.memo/.ui.MemoEdit: 1272 ms (total 1272 ms)
    11-04 02:04:16.934: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:16.943: DEBUG/ViewFlipper(171): updateRunning() mVisible=true, mStarted=false, mUserPresent=true, mRunning=false
    11-04 02:04:16.943: DEBUG/ViewFlipper(171): updateRunning() mVisible=true, mStarted=false, mUserPresent=true, mRunning=false
    11-04 02:04:16.978: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 26selEnd: 26
    11-04 02:04:17.464: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:17.464: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 29selEnd: 29
    11-04 02:04:17.664: DEBUG/IphoneEditText(430): onTouchEvent x = 249, y = 39
    11-04 02:04:17.664: DEBUG/IphoneEditText(430): action = 0
    11-04 02:04:17.674: DEBUG/IphoneEditText(430): mStatus.hasSelection = false
    11-04 02:04:17.693: DEBUG/IphoneEditText(430): onTouchEvent x = 258, y = 37
    11-04 02:04:17.693: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.724: DEBUG/IphoneEditText(430): onTouchEvent x = 261, y = 36
    11-04 02:04:17.734: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.754: DEBUG/IphoneEditText(430): onTouchEvent x = 260, y = 36
    11-04 02:04:17.754: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.774: DEBUG/IphoneEditText(430): onTouchEvent x = 264, y = 32
    11-04 02:04:17.784: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.804: DEBUG/IphoneEditText(430): onTouchEvent x = 269, y = 26
    11-04 02:04:17.814: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.834: DEBUG/IphoneEditText(430): onTouchEvent x = 266, y = 34
    11-04 02:04:17.834: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.864: DEBUG/IphoneEditText(430): onTouchEvent x = 274, y = 34
    11-04 02:04:17.864: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.893: DEBUG/IphoneEditText(430): onTouchEvent x = 275, y = 30
    11-04 02:04:17.893: DEBUG/IphoneEditText(430): action = 2
    11-04 02:04:17.914: DEBUG/IphoneEditText(430): onTouchEvent x = 275, y = 30
    11-04 02:04:17.923: DEBUG/IphoneEditText(430): action = 1
    11-04 02:04:17.923: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:17.934: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 26selEnd: 26
    11-04 02:04:17.944: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:17.953: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 29selEnd: 29
    11-04 02:04:17.974: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:17.983: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 26selEnd: 26
    11-04 02:04:18.103: DEBUG/IphoneEditText(430): beforeTextChanged cancelShow()
    11-04 02:04:18.103: DEBUG/IphoneEditText(430): beforeTextChanged start: 26after: 1count: 0
    11-04 02:04:18.103: DEBUG/MemoEdit(430): EdtContentTextWatcher.onTextChanged()  str:5+=    szdmj udfodePPL K
    11-04 02:04:18.103: DEBUG/MemoEdit(430): [L00
    11-04 02:04:18.103: DEBUG/MemoEdit(430): WX          ---s.length:40---split array count:3
    11-04 02:04:18.133: DEBUG/MemoEdit(430): edtContentTextWatcher.onTextChanged savaMemo()
    11-04 02:04:18.193: DEBUG/MemoEdit(430): savaMemo nextMemoId = 3
    11-04 02:04:18.263: DEBUG/MemoMainListAdapter(430): onContentChanged
    11-04 02:04:18.273: DEBUG/MemoMain(430): OnContentChangedListener.onContentChanged()
    11-04 02:04:18.293: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:18.293: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 32selEnd: 32
    11-04 02:04:18.313: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hskj.memo/.ui.MemoMain }
    11-04 02:04:18.574: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:18.584: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 27selEnd: 27
    11-04 02:04:18.594: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:18.604: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 4selEnd: 4
    11-04 02:04:18.754: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:18.754: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:18.754: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:18.764: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:04:19.234: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:19.243: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 22selEnd: 22
    11-04 02:04:19.257: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:19.263: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 27selEnd: 27
    11-04 02:04:19.273: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:19.273: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:19.273: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:04:19.283: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:04:19.434: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:19.470: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 28selEnd: 28
    11-04 02:04:19.473: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:19.473: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 29selEnd: 29
    11-04 02:04:19.493: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:19.493: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 30selEnd: 30
    11-04 02:04:19.493: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:19.493: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 31selEnd: 31
    11-04 02:04:19.604: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:19.604: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:19.614: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:19.624: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:04:20.063: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.CALL_BUTTON flg=0x10000000 cmp=com.android.contacts/.DialtactsActivity }
    11-04 02:04:20.163: DEBUG/IphoneEditText(430): onTouchEvent x = 281, y = 255
    11-04 02:04:20.173: DEBUG/IphoneEditText(430): action = 0
    11-04 02:04:20.183: DEBUG/IphoneEditText(430): mStatus.hasSelection = false
    11-04 02:04:20.213: DEBUG/IphoneEditText(430): onTouchEvent x = 281, y = 255
    11-04 02:04:20.223: DEBUG/IphoneEditText(430): action = 1
    11-04 02:04:20.233: DEBUG/IphoneMenuPopupWindow(430): popWindowWidth:120
    11-04 02:04:20.233: DEBUG/IphoneMenuPopupWindow(430): popWindowHeight:59
    11-04 02:04:20.243: DEBUG/IphoneMenuPopupWindow(430): before fixed x:281
    11-04 02:04:20.243: DEBUG/IphoneMenuPopupWindow(430): after fixed x:200
    11-04 02:04:20.243: DEBUG/IphoneMenuPopupWindow(430): before fixed y:162
    11-04 02:04:20.253: DEBUG/IphoneMenuPopupWindow(430): after fixed y:98
    11-04 02:04:20.253: DEBUG/IphoneMenuPopupWindow(430): setArrowMenuBackground:
    11-04 02:04:20.253: DEBUG/IphoneMenuPopupWindow(430): touchAndShowOffset:81
    11-04 02:04:20.283: DEBUG/IphoneMenuPopupWindow(430): when i = 0 hadFindArrowMenuPosition = false
    11-04 02:04:20.283: DEBUG/IphoneMenuPopupWindow(430): childWidth = 63
    11-04 02:04:20.293: DEBUG/IphoneMenuPopupWindow(430): touchAndShowOffset - childWidth = 18
    11-04 02:04:20.313: DEBUG/IphoneMenuPopupWindow(430): when i = 1 hadFindArrowMenuPosition = false
    11-04 02:04:20.313: DEBUG/IphoneMenuPopupWindow(430): childWidth = 63
    11-04 02:04:20.323: DEBUG/IphoneMenuPopupWindow(430): touchAndShowOffset - childWidth = -45
    11-04 02:04:20.323: DEBUG/IphoneMenuPopupWindow(430): i == menuCount- 1
    11-04 02:04:20.353: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:20.363: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 22selEnd: 22
    11-04 02:04:20.373: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:20.373: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:20.373: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:04:20.383: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:04:21.003: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:21.013: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 40selEnd: 40
    11-04 02:04:21.193: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:21.193: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:21.193: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:21.223: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:04:21.604: DEBUG/IphoneMenuPopupWindow(430): updateIphoneMenuPopupWindow dismiss:
    11-04 02:04:21.614: DEBUG/IphoneEditText(430): onTouchEvent x = 306, y = 148
    11-04 02:04:21.614: DEBUG/IphoneEditText(430): action = 0
    11-04 02:04:21.614: DEBUG/IphoneEditText(430): mStatus.hasSelection = false
    11-04 02:04:21.643: DEBUG/IphoneEditText(430): onTouchEvent x = 306, y = 148
    11-04 02:04:21.643: DEBUG/IphoneEditText(430): action = 1
    11-04 02:04:21.654: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:21.654: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 22selEnd: 22
    11-04 02:04:21.664: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:21.664: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:21.674: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:04:21.684: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:04:22.243: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:22.268: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 21selEnd: 21
    11-04 02:04:22.303: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:22.303: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 20selEnd: 20
    11-04 02:04:22.313: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:22.313: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 19selEnd: 19
    11-04 02:04:22.323: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:22.333: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 18selEnd: 18
    11-04 02:04:22.393: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:22.393: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 27selEnd: 27
    11-04 02:04:22.443: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:22.443: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 32selEnd: 32
    11-04 02:04:22.534: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:22.534: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:22.534: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:22.544: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:04:23.153: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:23.153: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 40selEnd: 40
    11-04 02:04:23.163: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:23.163: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 27selEnd: 27
    11-04 02:04:23.173: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:23.183: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 4selEnd: 4
    11-04 02:04:23.298: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:23.303: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:23.303: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:23.323: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:04:24.373: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:24.383: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 22selEnd: 22
    11-04 02:04:24.393: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:24.408: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 27selEnd: 27
    11-04 02:04:24.413: DEBUG/IphoneEditText(430): onSelectionChanged
    11-04 02:04:24.423: DEBUG/IphoneEditText(430): onSelectionChanged selStart: 32selEnd: 32
    11-04 02:04:24.433: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:04:24.433: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:04:24.433: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:04:24.443: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:04:24.924: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    11-04 02:04:24.944: DEBUG/AndroidRuntime(430): Shutting down VM
    11-04 02:04:24.953: WARN/dalvikvm(430): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
     
     
    //---------------此处发生错误---------------------
     
    11-04 02:04:24.953: ERROR/AndroidRuntime(430): Uncaught handler: thread main exiting due to uncaught exception
    11-04 02:04:24.973: ERROR/AndroidRuntime(430): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.app.Activity.startActivityForResult(Activity.java:2749)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.app.Activity.startActivity(Activity.java:2855)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.hskj.memo.ui.MemoEdit.onClick(MemoEdit.java:183)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.View.performClick(View.java:2364)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.View.onTouchEvent(View.java:4198)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.widget.TextView.onTouchEvent(TextView.java:6543)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.View.dispatchTouchEvent(View.java:3728)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.hskj.iphone.app.IphoneMenuBottomPopActivity.dispatchTouchEvent(IphoneMenuBottomPopActivity.java:104)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.os.Handler.dispatchMessage(Handler.java:99)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.os.Looper.loop(Looper.java:123)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at android.app.ActivityThread.main(ActivityThread.java:4363)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at java.lang.reflect.Method.invokeNative(Native Method)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at java.lang.reflect.Method.invoke(Method.java:521)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    11-04 02:04:24.973: ERROR/AndroidRuntime(430):     at dalvik.system.NativeStart.main(Native Method)
    11-04 02:04:24.993: INFO/Process(117): Sending signal. PID: 430 SIG: 3
    11-04 02:04:24.993: INFO/dalvikvm(430): threadid=7: reacting to signal 3
    11-04 02:04:25.023: INFO/dalvikvm(430): Wrote stack trace to '/data/anr/traces.txt'
    11-04 02:04:25.083: ERROR/ActivityThread(117): Failed to find provider info for android.server.checkin
    11-04 02:04:25.083: ERROR/Checkin(117): Error reporting crash
    11-04 02:04:25.283: DEBUG/dalvikvm(117): GC freed 18475 objects / 904864 bytes in 131ms
    11-04 02:04:25.343: WARN/WindowManager(117): No window to dispatch pointer action 1
    11-04 02:04:25.494: INFO/AndroidRuntime(423): AndroidRuntime onExit calling exit(92)
    11-04 02:04:26.043: DEBUG/dalvikvm(314): GC freed 3499 objects / 171848 bytes in 432ms
     
     
     
    3。  Monkey测试出现错误后一般查错步骤:
        1。找到是哪个monkey的哪个动作出的错:
            1。查看monkey出错前的一些事件动作,并手动执行该动作。
            2。若还不能找出,可以使用命令monkey -p com.hskj.memo -s 100 -v -v -v --throttle 2000 500
     
    ///--------------Monkey中输出的信息----------------
    # monkey -p com.hskj.memo -s 100 -v -v -v --throttle 3000 500
    :Monkey: seed=100 count=500
    :AllowPackage: com.hskj.memo
    :IncludeCategory: android.intent.category.LAUNCHER
    :IncludeCategory: android.intent.category.MONKEY
    // Selecting main activities from category android.intent.category.LAUNCHER
    //   - NOT USING main activity com.android.settings.Settings (from package com.android.settings)
    //   - NOT USING main activity com.android.contacts.DialtactsActivity (from package com.android.contacts)
    //   - NOT USING main activity com.android.contacts.ContactsListActivity (from package com.android.contacts)
    //   - NOT USING main activity com.hskj.iphonemms.ui.ConversationList (from package com.hskj.iphonemms)
    //   - NOT USING main activity com.android.calendar.LaunchActivity (from package com.android.calendar)
    //   - NOT USING main activity com.android.deskclock.DeskClockGroupActivity (from package com.android.deskclock)
    //   - NOT USING main activity com.android.systemupdater.SystemUpdate (from package com.android.systemupdater)
    //   - NOT USING main activity com.android.camera.Camera (from package com.android.camera)
    //   - NOT USING main activity com.android.browser.BrowserActivity (from package com.android.browser)
    //   - NOT USING main activity com.android.music.MusicBrowserActivity (from package com.android.music)
    //   - NOT USING main activity com.android.email.activity.Welcome (from package com.android.email)
    //   - NOT USING main activity com.hskj.iphonecamera.GalleryPicker (from package com.hskj.iphonegallery)
    //   + Using main activity com.hskj.memo.ui.MemoMain (from package com.hskj.memo)
    //   - NOT USING main activity com.android.term.Term (from package com.android.term)
    //   - NOT USING main activity com.android.development.Development (from package com.android.development)
    //   - NOT USING main activity com.hskj.iphone.voicememor.VoiceRecordActivity (from package com.hskj.iphone.voicememor)
    //   - NOT USING main activity com.hskj.iphonecalculator.Calculator (from package com.hskj.iphonecalculator)
    // Selecting main activities from category android.intent.category.MONKEY
    //   - NOT USING main activity com.android.settings.ManageApplications (from package com.android.settings)
    //   - NOT USING main activity com.android.settings.RunningServices (from package com.android.settings)
    //   - NOT USING main activity com.hskj.iphonehome.Launcher (from package com.hskj.iphonehome)
    //   - NOT USING main activity com.android.launcher.Launcher (from package com.android.launcher)
    //   - NOT USING main activity com.android.googlesearch.GoogleSearch (from package com.android.googlesearch)
    // Seeded: 100
    // Event percentages:
    //   0: 15.0%
    //   1: 10.0%
    //   2: 15.0%
    //   3: 25.0%
    //   4: 15.0%
    //   5: 2.0%
    //   6: 2.0%
    //   7: 1.0%
    //   8: 15.0%
    :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.hskj.memo/.ui.MemoMain;end
        // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hskj.memo/.ui.MemoMain } in package com.hskj.memo
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 3000 milliseconds                     //----------此时每经过一个动作就会有3秒钟的停顿--------------
    :Sending Pointer ACTION_DOWN x=1.0 y=377.0
    :Sending Pointer ACTION_UP x=1.0 y=377.0
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_DOWN x=104.0 y=178.0
    :Sending Pointer ACTION_UP x=104.0 y=178.0
    Sleeping for 3000 milliseconds
        // activityResuming(com.hskj.iphonehome)
        // Rejecting resume of package com.hskj.iphonehome
        // Allowing start of Intent { act=android.intent.action.EDIT dat=content://com.hskj.provider.memo/memo/3 cmp=com.hskj.memo/.ui.MemoEdit } in package com.hskj.memo
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 23    // KEYCODE_DPAD_CENTER
    :SendKey (ACTION_UP): 23    // KEYCODE_DPAD_CENTER
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_DOWN x=249.0 y=141.0
    :Sending Pointer ACTION_MOVE x=258.0 y=139.0
    :Sending Pointer ACTION_MOVE x=261.0 y=138.0
    :Sending Pointer ACTION_MOVE x=260.0 y=138.0
    :Sending Pointer ACTION_MOVE x=264.0 y=134.0
    :Sending Pointer ACTION_MOVE x=269.0 y=128.0
    :Sending Pointer ACTION_MOVE x=266.0 y=136.0
    :Sending Pointer ACTION_MOVE x=274.0 y=136.0
    :Sending Pointer ACTION_MOVE x=275.0 y=132.0
    :Sending Pointer ACTION_UP x=275.0 y=132.0
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 28    // KEYCODE_CLEAR
    :SendKey (ACTION_UP): 28    // KEYCODE_CLEAR
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 7    // KEYCODE_0
    :SendKey (ACTION_UP): 7    // KEYCODE_0
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 3000 milliseconds
    :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.hskj.memo/.ui.MemoMain;end
        // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hskj.memo/.ui.MemoMain } in package com.hskj.memo
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_MOVE x=-4.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=2.0 y=1.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=1.0 y=2.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=2.0 y=3.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=4.0
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 5    // KEYCODE_CALL
    :SendKey (ACTION_UP): 5    // KEYCODE_CALL
        // Rejecting start of Intent { act=android.intent.action.CALL_BUTTON cmp=com.android.contacts/.DialtactsActivity } in package com.android.contacts
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_DOWN x=281.0 y=162.0
    :Sending Pointer ACTION_UP x=281.0 y=162.0
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 78    // KEYCODE_NUM
    :SendKey (ACTION_UP): 78    // KEYCODE_NUM
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 20    // KEYCODE_DPAD_DOWN
    :SendKey (ACTION_UP): 20    // KEYCODE_DPAD_DOWN
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 22    // KEYCODE_DPAD_RIGHT
    :SendKey (ACTION_UP): 22    // KEYCODE_DPAD_RIGHT
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 7    // KEYCODE_0
    :SendKey (ACTION_UP): 7    // KEYCODE_0
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_DOWN x=306.0 y=55.0
    :Sending Pointer ACTION_UP x=306.0 y=55.0
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 60    // KEYCODE_SHIFT_RIGHT
    :SendKey (ACTION_UP): 60    // KEYCODE_SHIFT_RIGHT
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_MOVE x=-4.0 y=2.0
    :Sending Pointer ACTION_MOVE x=1.0 y=1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=-2.0
    :Sending Pointer ACTION_MOVE x=4.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-5.0
    :SendKey (ACTION_DOWN): 22    // KEYCODE_DPAD_RIGHT
    :SendKey (ACTION_UP): 22    // KEYCODE_DPAD_RIGHT
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_MOVE x=2.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=-5.0
    :Sending Pointer ACTION_MOVE x=-2.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-1.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=2.0 y=-1.0
    :Sending Pointer ACTION_MOVE x=-3.0 y=0.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=4.0 y=1.0
    :Sending Pointer ACTION_MOVE x=3.0 y=-4.0
    :Sending Pointer ACTION_MOVE x=-4.0 y=4.0
    :SendKey (ACTION_DOWN): 21    // KEYCODE_DPAD_LEFT
    :SendKey (ACTION_UP): 21    // KEYCODE_DPAD_LEFT
    Sleeping for 3000 milliseconds
    :SendKey (ACTION_DOWN): 82    // KEYCODE_MENU
    :SendKey (ACTION_UP): 82    // KEYCODE_MENU
    Sleeping for 3000 milliseconds
    :Sending Pointer ACTION_DOWN x=99.0 y=260.0
    :Sending Pointer ACTION_UP x=99.0 y=260.0
    Sleeping for 3000 milliseconds
    // CRASH: com.hskj.memo (pid 441)
    // Short Msg: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    // Long Msg: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    // Build Label: android:cyanogen/cyanogen/generic/:2.1-update1/ECLAIR/eng.root.20101029.152625:eng/test-keys
    // Build Changelist: -1
    // Build Time: 1288337269
    // ID:
    // Tag: AndroidRuntime
    // android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO dat=mailto: (has extras) }
    //   at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
    //   at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
    //   at android.app.Activity.startActivityForResult(Activity.java:2749)
    //   at android.app.Activity.startActivity(Activity.java:2855)
    //   at com.hskj.memo.ui.MemoEdit.onClick(MemoEdit.java:183)
    //   at android.view.View.performClick(View.java:2364)
    //   at android.view.View.onTouchEvent(View.java:4198)
    //   at android.widget.TextView.onTouchEvent(TextView.java:6543)
    //   at android.view.View.dispatchTouchEvent(View.java:3728)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
    //   at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
    //   at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
    //   at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
    //   at com.hskj.iphone.app.IphoneMenuBottomPopActivity.dispatchTouchEvent(IphoneMenuBottomPopActivity.java:104)
    //   at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
    //   at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
    //   at android.os.Handler.dispatchMessage(Handler.java:99)
    //   at android.os.Looper.loop(Looper.java:123)
    //   at android.app.ActivityThread.main(ActivityThread.java:4363)
    //   at java.lang.reflect.Method.invokeNative(Method.java:-2)
    //   at java.lang.reflect.Method.invoke(Method.java:521)
    //   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    //   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    //   at dalvik.system.NativeStart.main(NativeStart.java:-2)
     
    ** Monkey aborted due to error.
    Events injected: 90
    :Dropped: keys=0 pointers=0 trackballs=0 flips=0
    ## Network stats: elapsed time=87504ms (87504ms mobile, 0ms wifi, 0ms not connected)
    ** System appears to have crashed at event 90 of 500 using seed 100
    #
     
     
    //-----------------eclipse中的LogCat的输出信息----------------------
     
    11-04 02:44:38.494: DEBUG/libEGL(451): Setting TLS: 0xafe43b74 to 0xac70a2ec
    11-04 02:44:38.693: DEBUG/AndroidRuntime(451): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
    11-04 02:44:38.693: DEBUG/AndroidRuntime(451): CheckJNI is ON
    11-04 02:44:38.913: DEBUG/AndroidRuntime(451): --- registering native functions ---
    11-04 02:44:39.244: DEBUG/ddm-heap(451): Got feature list request
    11-04 02:44:40.943: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hskj.memo/.ui.MemoMain }
    11-04 02:44:40.963: DEBUG/LifeCryle(314): Launcher onSaveInstanceState!
    11-04 02:44:40.963: DEBUG/LifeCryle(314): Launcher onPause!
    11-04 02:44:41.114: DEBUG/MemoListView(441): MemoListView(Context context, AttributeSet attrs) mMaximumVelocity:4000
    11-04 02:44:41.244: DEBUG/mListView.getChildCount()(441): mListView.getChildCount()=0
    11-04 02:44:41.474: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:44:41.574: DEBUG/MemoMainListAdapter(441): formatCalendar days:0
    11-04 02:44:41.593: DEBUG/MemoMainListAdapter(441): formatCalendar days:0
    11-04 02:44:41.643: DEBUG/MemoMainListAdapter(441): formatCalendar days:0
    11-04 02:44:41.663: DEBUG/MemoMainListAdapter(441): formatCalendar days:0
    11-04 02:44:41.683: DEBUG/MemoMainListAdapter(441): formatCalendar days:0
    11-04 02:44:41.793: INFO/ActivityManager(117): Displayed activity com.hskj.memo/.ui.MemoMain: 824 ms (total 824 ms)
    11-04 02:44:41.823: DEBUG/LifeCryle(314): Launcher onStop!
    11-04 02:44:41.843: DEBUG/LifeCryle(314): Launcher onDestroy!
    11-04 02:44:41.843: DEBUG/IphoneHomeLoaders(314): aborting loaders
    11-04 02:44:44.083: WARN/KeyCharacterMap(441): No keyboard for id 0
    11-04 02:44:44.083: WARN/KeyCharacterMap(441): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    11-04 02:44:46.963: DEBUG/dalvikvm(314): GC freed 1549 objects / 89656 bytes in 140ms
    11-04 02:44:47.003: INFO/dalvikvm(314): Uncaught exception thrown by finalizer (will be discarded):
    11-04 02:44:47.013: INFO/dalvikvm(314): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@43a0e918 on panel that has not been deactivated or closed
    11-04 02:44:47.013: INFO/dalvikvm(314):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:599)
    11-04 02:44:47.013: INFO/dalvikvm(314):     at dalvik.system.NativeStart.run(Native Method)
    11-04 02:44:47.174: DEBUG/MemoListView(441): onTouchEvent case MotionEvent.ACTION_DOWN:
    11-04 02:44:47.214: DEBUG/MemoListView(441): onTouchEvent case MotionEvent.ACTION_UP:
    11-04 02:44:47.214: DEBUG/MemoListView(441): onTouchEvent case MotionEvent.ACTION_UP:   Math.abs(velocityX):0---Math.abs(velocityY):0
    11-04 02:44:50.234: DEBUG/MemoListView(441): onTouchEvent case MotionEvent.ACTION_DOWN:
    11-04 02:44:50.304: DEBUG/MemoListView(441): onTouchEvent case MotionEvent.ACTION_UP:
    11-04 02:44:50.314: DEBUG/MemoListView(441): onTouchEvent case MotionEvent.ACTION_UP:   Math.abs(velocityX):0---Math.abs(velocityY):0
    11-04 02:44:50.883: DEBUG/MemoProvider(441): getType uri = content://com.hskj.provider.memo/memo/3, match =2
    11-04 02:44:50.903: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.EDIT dat=content://com.hskj.provider.memo/memo/3 cmp=com.hskj.memo/.ui.MemoEdit }
    11-04 02:44:51.094: DEBUG/dalvikvm(441): GC freed 1717 objects / 82024 bytes in 63ms
    11-04 02:44:51.134: INFO/dalvikvm(441): Uncaught exception thrown by finalizer (will be discarded):
    11-04 02:44:51.144: INFO/dalvikvm(441): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@439b2be8 on memos that has not been deactivated or closed
    11-04 02:44:51.144: INFO/dalvikvm(441):     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:599)
    11-04 02:44:51.144: INFO/dalvikvm(441):     at dalvik.system.NativeStart.run(Native Method)
    11-04 02:44:51.274: DEBUG/IphoneEditText(441): onSelectionChanged
    11-04 02:44:51.444: DEBUG/IphoneEditText(441): beforeTextChanged cancelShow()
    11-04 02:44:51.444: DEBUG/IphoneEditText(441): beforeTextChanged start: 0after: 3count: 0
    11-04 02:44:51.454: DEBUG/IphoneEditText(441): onSelectionChanged
    11-04 02:44:51.454: DEBUG/IphoneEditText(441): onSelectionChanged selStart: 0selEnd: 0
    11-04 02:44:51.524: DEBUG/IphoneEditText(441): onSelectionChanged
    11-04 02:44:51.534: DEBUG/IphoneEditText(441): onSelectionChanged selStart: 3selEnd: 3
    11-04 02:44:51.544: DEBUG/IphoneEditText(441): onWindowFocusChanged
    11-04 02:44:51.564: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:44:51.564: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:44:51.866: INFO/ActivityManager(117): Displayed activity com.hskj.memo/.ui.MemoEdit: 922 ms (total 922 ms)
    11-04 02:44:53.344: WARN/KeyCharacterMap(441): No keyboard for id 0
    11-04 02:44:53.344: WARN/KeyCharacterMap(441): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    11-04 02:44:56.574: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:44:56.594: DEBUG/ViewFlipper(171): updateRunning() mVisible=true, mStarted=false, mUserPresent=true, mRunning=false
    11-04 02:44:56.594: DEBUG/ViewFlipper(171): updateRunning() mVisible=true, mStarted=false, mUserPresent=true, mRunning=false
    11-04 02:44:59.813: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:44:59.813: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:44:59.813: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:44:59.823: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:45:05.883: DEBUG/IphoneEditText(441): onTouchEvent x = 249, y = 234
    11-04 02:45:05.883: DEBUG/IphoneEditText(441): action = 0
    11-04 02:45:05.893: DEBUG/IphoneEditText(441): mStatus.hasSelection = false
    11-04 02:45:05.983: DEBUG/IphoneEditText(441): onTouchEvent x = 258, y = 232
    11-04 02:45:05.993: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.013: DEBUG/IphoneEditText(441): onTouchEvent x = 261, y = 231
    11-04 02:45:06.033: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.053: DEBUG/IphoneEditText(441): onTouchEvent x = 260, y = 231
    11-04 02:45:06.053: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.074: DEBUG/IphoneEditText(441): onTouchEvent x = 264, y = 227
    11-04 02:45:06.074: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.104: DEBUG/IphoneEditText(441): onTouchEvent x = 269, y = 221
    11-04 02:45:06.104: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.134: DEBUG/IphoneEditText(441): onTouchEvent x = 266, y = 229
    11-04 02:45:06.144: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.164: DEBUG/IphoneEditText(441): onTouchEvent x = 274, y = 229
    11-04 02:45:06.164: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.204: DEBUG/IphoneEditText(441): onTouchEvent x = 275, y = 225
    11-04 02:45:06.215: DEBUG/IphoneEditText(441): action = 2
    11-04 02:45:06.224: DEBUG/IphoneEditText(441): onTouchEvent x = 275, y = 225
    11-04 02:45:06.234: DEBUG/IphoneEditText(441): action = 1
    11-04 02:45:06.244: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:06.244: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:06.244: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:45:06.254: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:45:12.404: DEBUG/IphoneEditText(441): beforeTextChanged cancelShow()
    11-04 02:45:12.414: DEBUG/IphoneEditText(441): beforeTextChanged start: 3after: 1count: 0
    11-04 02:45:12.424: DEBUG/MemoEdit(441): EdtContentTextWatcher.onTextChanged()  str:9a00---s.length:4---split array count:1
    11-04 02:45:12.464: DEBUG/MemoEdit(441): edtContentTextWatcher.onTextChanged savaMemo()
    11-04 02:45:12.504: DEBUG/MemoEdit(441): savaMemo nextMemoId = 2
    11-04 02:45:12.524: DEBUG/MemoMainListAdapter(441): onContentChanged
    11-04 02:45:12.524: DEBUG/MemoMain(441): OnContentChangedListener.onContentChanged()
    11-04 02:45:15.514: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:15.514: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:15.514: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:45:15.524: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:45:18.484: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.hskj.memo/.ui.MemoMain }
    11-04 02:45:21.793: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:21.793: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:21.793: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:45:21.813: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:45:22.033: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:22.033: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:22.033: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:45:22.043: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:45:22.813: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:22.813: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:22.813: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:45:22.833: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:45:23.023: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:23.023: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:23.023: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:45:23.033: DEBUG/PinyinIME(171): onStartInputView  contentType: 0 Restarting:false
    11-04 02:45:26.294: INFO/ActivityManager(117): Starting activity: Intent { act=android.intent.action.CALL_BUTTON flg=0x10000000 cmp=com.android.contacts/.DialtactsActivity }
    11-04 02:45:32.524: DEBUG/IphoneEditText(441): onTouchEvent x = 281, y = 255
    11-04 02:45:32.535: DEBUG/IphoneEditText(441): action = 0
    11-04 02:45:32.535: DEBUG/IphoneEditText(441): mStatus.hasSelection = false
    11-04 02:45:32.603: DEBUG/IphoneEditText(441): onTouchEvent x = 281, y = 255
    11-04 02:45:32.603: DEBUG/IphoneEditText(441): action = 1
    11-04 02:45:32.623: DEBUG/IphoneMenuPopupWindow(441): popWindowWidth:120
    11-04 02:45:32.623: DEBUG/IphoneMenuPopupWindow(441): popWindowHeight:59
    11-04 02:45:32.645: DEBUG/IphoneMenuPopupWindow(441): before fixed x:281
    11-04 02:45:32.645: DEBUG/IphoneMenuPopupWindow(441): after fixed x:200
    11-04 02:45:32.645: DEBUG/IphoneMenuPopupWindow(441): before fixed y:162
    11-04 02:45:32.645: DEBUG/IphoneMenuPopupWindow(441): after fixed y:98
    11-04 02:45:32.645: DEBUG/IphoneMenuPopupWindow(441): setArrowMenuBackground:
    11-04 02:45:32.645: DEBUG/IphoneMenuPopupWindow(441): touchAndShowOffset:81
    11-04 02:45:32.663: DEBUG/IphoneMenuPopupWindow(441): when i = 0 hadFindArrowMenuPosition = false
    11-04 02:45:32.673: DEBUG/IphoneMenuPopupWindow(441): childWidth = 63
    11-04 02:45:32.673: DEBUG/IphoneMenuPopupWindow(441): touchAndShowOffset - childWidth = 18
    11-04 02:45:32.703: DEBUG/IphoneMenuPopupWindow(441): when i = 1 hadFindArrowMenuPosition = false
    11-04 02:45:32.703: DEBUG/IphoneMenuPopupWindow(441): childWidth = 63
    11-04 02:45:32.703: DEBUG/IphoneMenuPopupWindow(441): touchAndShowOffset - childWidth = -45
    11-04 02:45:32.713: DEBUG/IphoneMenuPopupWindow(441): i == menuCount- 1
    11-04 02:45:32.753: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:32.753: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:32.753: DEBUG/PinyinIME(171): onStartInput  ccontentType: 147457 Restarting:false
    11-04 02:45:32.763: DEBUG/PinyinIME(171): onStartInputView  contentType: 147457 Restarting:false
    11-04 02:45:41.903: DEBUG/PinyinIME(171): onFinishInputView.
    11-04 02:45:41.903: DEBUG/PinyinIME(171): onFinishInput.
    11-04 02:45:41.903: DEBUG/PinyinIME(171): onStartInput  ccontentType: 0 Restarting:false
    11-04 02:45:41.913: DEBUG/PinyinIME(171): onStartInputView&nb
Open Toolbar