简体   繁体   English

无法在MobileFirst 7.1 Android模拟器上运行应用程序

[英]Not able to run app on MobileFirst 7.1 Android simulator

Import the sample Hello World app (v7.0 version) to MobileFirst 7.1 (7.1.0.00-20150913-2345), deploy and run on Android simulator, getting an alert dialog with an entry gap_init:2 and two buttons, if dismiss the dialog with OK or Cancel button, the hello world page does shown. 将示例Hello World应用程序(v7.0版本)导入到MobileFirst 7.1(7.1.0.00-20150913-2345),在Android模拟器上部署并运行,如果出现警告对话框,则需要输入gap_init:2和两个按钮(如果关闭该对话框)使用“确定”或“取消”按钮,会显示hello world页面。 However, if run our app which has adapter call to server, the app doesn't run after dismiss the dialog. 但是,如果运行带有对服务器的适配器调用的应用程序,则关闭对话框后该应用程序将无法运行。 The same app can run in iPhone simulator without any problem. 相同的应用程序可以在iPhone模拟器中运行,没有任何问题。 Browser console log has this error after the alert dialog pops up : TypeError: this.vectorLayer is undefined after dismiss the dialog, console log add this error: TypeError: cordova.exec is not a function I found other people have reported similar error for v7.0. 警报对话框弹出后,浏览器控制台日志中出现此错误: TypeError:关闭对话框后未定义this.vectorLayer ,控制台日志中添加此错误: TypeError:cordova.exec不是一个函数,我发现其他人针对v7报告了类似错误.0。 and wonder whether it is fixed or not. 想知道它是否固定。

Edit: This is in fact not related to the Android Emulator, but to previewing the Android environment in the MobileFirst Console's MBS. 编辑:这实际上与Android Emulator不相关,但是与在MobileFirst Console的MBS中预览Android环境有关。 This happens due to a regression and is taken care of in APAR PI50036 CORDOVA "GAP_INIT:2" ERROR WHEN PREVIEWING ANDROID IN MBS . 发生这种情况是由于回归,并且在预览MBS中的ANDROID时会APAR PI50036 CORDOVA“ GAP_INIT:2”错误中予以解决


I cannot confirm this. 我无法确认。
I am using the latest 7.1 iFix available from IBM Fix Central (I am using IBM MobileFirst Platform Studio 7.1.0.00-20150929-1541) 我正在使用IBM Fix Central提供的最新的7.1 iFix(我正在使用IBM MobileFirst Platform Studio 7.1.0.00-20150929-1541)

  1. Created a new project and application, added the Android environment 创建了一个新项目和应用程序,添加了Android环境
  2. Added WL.Client.connect() code that displays alert in case of successor failure, in common\\js\\main.js 添加了WL.Client.connect()代码,该代码在common \\ js \\ main.js中在继任者失败的情况下显示警报
  3. Launched in Android Emulator (AVD running 5.0.1) 在Android模拟器中启动(运行5.0.1的AVD)

My alert showing "success" was displayed. 我的警报显示为“成功”。

The only thing I had to make sure of is that the app is connecting to the correct host in the generated Android project > assets > wlclient.properties, changed the host value from "mbp-idan" (my hostname) to my actual IP address. 我唯一需要确定的是,应用程序正在连接到生成的Android项目>资产> wlclient.properties中的正确主机,将主机值从“ mbp-idan”(我的主机名)更改为我的实际IP地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM