Hello,
I recently created and ran the Android application created with the default WebSharper Android application template. If I do nothing to modify the application, no pages show up inside the application in the emulator. If I add a few lines of console logging, I can see the application pages, but I get errors in the log. Details as follows:
I create the project and build the app in Visual Studio, then go into the android directory on the command line, where I set the ANDROID_SDK environment variable. While running the emulator, I then run
android --clear-cache update project -p "`pwd`"
ant debug install
The installation to the emulator is successful. I then run
adb shell
# logcat
to see the console output. When I launch the application, it starts but I get a completely black window inside the main application frame (the application name does show up at the top). If I click on the black part of the window, I get:
W/WindowManager( 60): No window to dispatch pointer action 0
I then added the following two lines of code to the application in the Main function in Main.fs:
| Some ctx ->
+ JavaScript.Log("Starting the mobile app with context:")
+ JavaScript.Log(ctx)
ctx.Trace(Mobile.Priority.Info, "Website", "Starting the mobile app..")
When I run the application I now can see the pages and click on the links. However, logcat is showing a considerable number of the following error:
E/JavaScriptConsole( 277): undefined:1: ReferenceError: Can't find variable: AndroidWebSharperReceiver
Any help or suggestions welcome.