RhoLog does not work on Android and RMS 5.0.25

N Nicolas Hinze 3 years 6 months ago
2 1 0

When calling Rho.Log.showLog(); in JavaScript I get the following error in Android (Device log in Android Monitor):

E/Web Console(5693): Uncaught Error: Error calling method on NPObject. at http://127.0.0.1:34254/public/api/rhoapi-modules.js:1

When tapping the "Log" menu item in the Android App menu I get the following application crash. My Android application menu is defined as:

    @default_menu = {
      "Log" => :log,
      :separator => nil,
      "Close" => :close
    }

I use RMS 5.0.25, minSDK 17, SDK 4.4.2, NDK 10d. Error happens on Android 4.2 and 4.4.

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.coursewalk.coursewalk/com.rhomobile.rhodes.ui.LogViewDialog}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1767)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1563)
at android.app.Activity.startActivityForResult(Activity.java:3505)
at android.app.Activity.startActivityForResult(Activity.java:3466)
at android.app.Activity.startActivity(Activity.java:3708)
at android.app.Activity.startActivity(Activity.java:3676)
at com.rhomobile.rhodes.RhodesService.startActivity(RhodesService.java:1395)
at com.rhomobile.rhodes.RhodesService.showLogView(RhodesService.java:580)
at com.rhomobile.rhodes.RhoMenu$ItemType$9.action(RhoMenu.java:84)
at com.rhomobile.rhodes.RhoMenu.onMenuItemSelected(RhoMenu.java:221)
at com.rhomobile.rhodes.RhodesActivity.onOptionsItemSelected(RhodesActivity.java:425)
at android.app.Activity.onMenuItemSelected(Activity.java:2681)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1103)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:741)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:884)
at com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.java:166)
at android.widget.AdapterView.performItemClick(AdapterView.java:299)
at android.widget.AbsListView.performItemClick(AbsListView.java:1282)
at android.widget.ListView.performItemClick(ListView.java:4450)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3181)
at android.widget.AbsListView$3.run(AbsListView.java:3932)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5633)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:896)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:712)
at dalvik.system.NativeStart.main(Native Method)

Please Register or Login to post a reply

1 Replies

J Jon Tara

As a workaround, you might implement some way to export the log file. In my own work, we provide a way to send it to Dropbox or to email it. We also implement our own log page.

It's just a file. As a workaround, just go read the file and do something with it.

CONTACT
Can’t find what you’re looking for?