- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
Monkey测试时遇到email模块的 java.lang.Error: Unknown account type异常的 解决...
录入:edatop.com 点击:
[DESCRIPTION]
在跑monkey时,可能会遇到如下email的异常:
java.lang.Error: Unknown account type: imap (此处可能是pop3)
at
com.android.email.activity.setup.AccountSetupExchangeFragment.loADSettings
(AccountSetupExchangeFragment.java:319)
at
com.android.email.activity.setup.AccountSetupExchangeFragment.onStart(Acco
untSetupExchangeFragment.java:194)
at android.app.Fragment.performStart(Fragment.java:1719)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:913)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1057)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1039)
at
android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:1845)
at android.app.Activity.performStart(Activity.java:5144)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2408)
at android.app.ActivityThread.access$600(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5405)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java
:838)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
[SOLUTION]
这个问题的原因是选择账户类型时同时用多个手指点击了不同的类型(monkey可以模
拟多点触控,所以能复现这个问题,而终端用户基本不会这样子非法操作),而
pop3,IMAP和EXCHANGE3个地方 ,是3条路,而多点触控就可以同时从3条路进去,但
是访问的是同一组数据,这样就会改乱掉而引起异常。
手动复现的步骤是:
1.Launch "Settings"->Tap "+Add account"->"Email"->Input the email address
abd password->"Manual setup"
2.Tap "IMAP" and "Exchange" at the same time. (The key point is that
tapping two account types at the same time ).
3.Press HW-Back key twice.
若需要修改,请在
alps/packakges/apps/Email/src/com/android/email/activity/setup/AccountSetu
pAccountType.java
约150行,修改onCLIck()方法:
public void onClick(View v) {
-----------------新增代码开始-----------------------------------------
if (isFinishing()) {
return;
}
-----------------新增代码结束-----------------------------------------
switch (v.getId()) {
case R.id.pop:
......
}
}
这个修改主要是防止用户同时点击多个按钮。
在跑monkey时,可能会遇到如下email的异常:
java.lang.Error: Unknown account type: imap (此处可能是pop3)
at
com.android.email.activity.setup.AccountSetupExchangeFragment.loADSettings
(AccountSetupExchangeFragment.java:319)
at
com.android.email.activity.setup.AccountSetupExchangeFragment.onStart(Acco
untSetupExchangeFragment.java:194)
at android.app.Fragment.performStart(Fragment.java:1719)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:913)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1057)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1039)
at
android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:1845)
at android.app.Activity.performStart(Activity.java:5144)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2408)
at android.app.ActivityThread.access$600(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5405)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java
:838)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
[SOLUTION]
这个问题的原因是选择账户类型时同时用多个手指点击了不同的类型(monkey可以模
拟多点触控,所以能复现这个问题,而终端用户基本不会这样子非法操作),而
pop3,IMAP和EXCHANGE3个地方 ,是3条路,而多点触控就可以同时从3条路进去,但
是访问的是同一组数据,这样就会改乱掉而引起异常。
手动复现的步骤是:
1.Launch "Settings"->Tap "+Add account"->"Email"->Input the email address
abd password->"Manual setup"
2.Tap "IMAP" and "Exchange" at the same time. (The key point is that
tapping two account types at the same time ).
3.Press HW-Back key twice.
若需要修改,请在
alps/packakges/apps/Email/src/com/android/email/activity/setup/AccountSetu
pAccountType.java
约150行,修改onCLIck()方法:
public void onClick(View v) {
-----------------新增代码开始-----------------------------------------
if (isFinishing()) {
return;
}
-----------------新增代码结束-----------------------------------------
switch (v.getId()) {
case R.id.pop:
......
}
}
这个修改主要是防止用户同时点击多个按钮。
好文章,,
申明:网友回复良莠不齐,仅供参考。如需专业帮助,请学习易迪拓培训专家讲授的ADS视频培训课程。
上一篇:中秋求ADS仿真MMIC用的PDK
下一篇:code如何集成Biquads参数功能
ADS培训课程推荐详情>>
国内最全面、最专业的Agilent ADS培训课程,可以帮助您从零开始,全面系统学习ADS设计应用【More..】
- Agilent ADS教学培训课程套装
- 两周学会ADS2011、ADS2013视频教程
- ADS2012、ADS2013射频电路设计详解
- ADS高低阻抗线微带滤波器设计培训教程
- ADS混频器仿真分析实例视频培训课程
- ADS Momentum电磁仿真设计视频课程
- ADS射频电路与通信系统设计高级培训
- ADS Layout和电磁仿真设计培训视频
- ADS Workspace and Simulators Training Course
- ADS Circuit Simulation Training Course
- ADS Layout and EM Simulation Training Course
- Agilent ADS 内部原版培训教材合集