我按照MQA在线知识中心的说明,在v2.7.1上使用原生Android java库检测MobileFirst Platform(v7)应用程序。我无法确定它是否是产品问题,或者是否是某种东西我错过了项目设置。这在AVD以及运行Android 5.1的真实Nexus 5上都失败了。
还有什么想法我应该注意什么?
我在这里附加了堆栈跟踪
04-22 07:47:24.400: D/AndroidRuntime(25228): Shutting down VM
04-22 07:47:24.400: E/ApplauseUncaughtExceptionHandler(25228): Applause intercepted uncaught exception: android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@352481e -- the specified window type is not valid
04-22 07:47:24.400: W/System.err(25228): android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@352481e -- the specified window type is not valid
04-22 07:47:24.400: W/System.err(25228): at android.view.ViewRootImpl.setView(ViewRootImpl.java:594)
04-22 07:47:24.400: W/System.err(25228): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
04-22 07:47:24.400: W/System.err(25228): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.dialog.ApplauseDialog.attach(ApplauseDialog.java:167)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.dialog.ApplauseDialog.show(ApplauseDialog.java:152)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.dialog.LoginDialog.show(LoginDialog.java:53)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.dialog.QuickLoginDialog.show(QuickLoginDialog.java:77)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.dialog.LoginDialogWrapper.show(LoginDialogWrapper.java:18)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.logic.IdentifyFinishedListener.displayLoginActivity(IdentifyFinishedListener.java:41)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.logic.IdentifyFinishedListener.onIdentifyFinished(IdentifyFinishedListener.java:27)
04-22 07:47:24.400: W/System.err(25228): at com.applause.android.logic.QaIdentifyHandler$1.run(QaIdentifyHandler.java:56)
04-22 07:47:24.400: W/System.err(25228): at android.os.Handler.handleCallback(Handler.java:739)
04-22 07:47:24.401: W/System.err(25228): at android.os.Handler.dispatchMessage(Handler.java:95)
04-22 07:47:24.401: W/System.err(25228): at android.os.Looper.loop(Looper.java:135)
04-22 07:47:24.401: W/System.err(25228): at android.app.ActivityThread.main(ActivityThread.java:5254)
04-22 07:47:24.401: W/System.err(25228): at java.lang.reflect.Method.invoke(Native Method)
04-22 07:47:24.401: W/System.err(25228): at java.lang.reflect.Method.invoke(Method.java:372)
04-22 07:47:24.401: W/System.err(25228): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
04-22 07:47:24.401: W/System.err(25228): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
04-22 07:47:24.403: I/Client(25228): Reporting crash to Applause.
答案 0 :(得分:1)
这是由Android 5.1更改引起的错误。正在调查可能需要更新MQA SDK的修复程序。同时使用Android 5.0的模拟器或设备
答案 1 :(得分:0)
请注意,如果您仍想让应用程序在Android 5.1上运行,您可以在检查SDK级别时包装启动MQA的代码:
if (android.os.Build.VERSION.SDK_INT <= 21){
Configuration configuration = new Configuration.Builder(this)
.withAPIKey(APP_KEY) //Provides the quality assurance application APP_KEY
.withMode(Mode.QA) //Selects the quality assurance application mode
.withReportOnShakeEnabled(true) //Enables shake report trigger
.build();
MQA.startNewSession(this, configuration);
}
当新的MQA库支持Android 5.1时,您当然需要更新您的应用程序以删除此代码。