I built a Multipage application by using IBM MobileFirst, according to
据我所知,我使用IBM MobileFirst构建了一个Multipage应用程序
See the [A separate HTML file for each application “page”]
请参阅[每个应用程序的单独HTML文件“页面”]
It work fine on my Open MobileFirst Console.
它在我的Open MobileFirst控制台上运行良好。
But When I try to run in Android Studio, as below show:
但是当我尝试在Android Studio中运行时,如下所示:
After I click Run, the simulator show blank activity.
单击“运行”后,模拟器显示空白活动。
Below is the error log from Android Studio:
以下是Android Studio的错误日志:
Anyone know what is the reason ?? Thanks in advance.
谁知道是什么原因?提前致谢。
The link is my code: https://www.dropbox.com/sh/r73giz4s7hkoh97/AAAbHvpC6TgER-pSL0Y_5rgka?dl=0
链接是我的代码:https://www.dropbox.com/sh/r73giz4s7hkoh97/AAAbHvpC6TgER-pSL0Y_5rgka?dl = 0
1 个解决方案
#1
Android's WebView is less forgiving than a desktop browser, I suppose.
我想,Android的WebView比桌面浏览器更不宽容。
You're trying to load MainPage.html
but the filename is actually mainPage.html
(note the lower-case "m"). Fix this discrepancy and the page will load correctly also when testing in Android Emulator.
您正在尝试加载MainPage.html,但文件名实际上是mainPage.html(请注意小写“m”)。修复此差异,在Android模拟器中进行测试时,页面也会正确加载。
P.S.,
As a best practice you should move the inline CSS and JS from index.html into main.css and main.js instead.
P.S.,作为一种最佳实践,您应该将内联CSS和JS从index.html移动到main.css和main.js中。
#1
Android's WebView is less forgiving than a desktop browser, I suppose.
我想,Android的WebView比桌面浏览器更不宽容。
You're trying to load MainPage.html
but the filename is actually mainPage.html
(note the lower-case "m"). Fix this discrepancy and the page will load correctly also when testing in Android Emulator.
您正在尝试加载MainPage.html,但文件名实际上是mainPage.html(请注意小写“m”)。修复此差异,在Android模拟器中进行测试时,页面也会正确加载。
P.S.,
As a best practice you should move the inline CSS and JS from index.html into main.css and main.js instead.
P.S.,作为一种最佳实践,您应该将内联CSS和JS从index.html移动到main.css和main.js中。