About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Troubleshooting
Problem
You might experience an application crash when you use the Cordova InAppBrowser plug-in in a hybrid application with an Android environment.
Symptom
The following Android exception might be seen:
E/AndroidRuntime(28398): FATAL EXCEPTION: main
E/AndroidRuntime(28398): android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime(28398): at android.content.res.Resources.getValue(Resources.java:1883)
E/AndroidRuntime(28398): at android.content.res.Resources.getDrawable(Resources.java:1520)
E/AndroidRuntime(28398): at org.apache.cordova.inappbrowser.InAppBrowser$5.run(InAppBrowser.java:500)
E/AndroidRuntime(28398): at android.app.Activity.runOnUiThread(Activity.java:4785)
E/AndroidRuntime(28398): at org.apache.cordova.inappbrowser.InAppBrowser.showWebPage(InAppBrowser.java:654)
E/AndroidRuntime(28398): at org.apache.cordova.inappbrowser.InAppBrowser$1.run(InAppBrowser.java:149)
Cause
Three PNG files are missing from the \native\res\drawable-hdpi directory of your Worklight V6.2 project.
Resolving The Problem
The current workaround is to create a stand-alone Cordova 3.4 Android application with the Cordova Command Line Interface.
This workaround does not replace your Worklight application, but you can generate the missing resources.
Workaround Procedure:
- Navigate to the Android Platform Guide.
- In the Requirements and Support section, follow the steps to include the tools and platform-tools directories for the Android SDK in your PATH environment and to enable Java and Ant.
- Navigate to the Command-Line Interface.
- Follow the steps in the Prerequisites section.
- Execute the following commands:
$ cordova create hello com.example.hello "HelloWorld"
$ cd hello
$ cordova platform add android
$ cordova plugin add org.apache.cordova.inappbrowser
$ cordova build
- Navigate back to the Android Platform Guide.
- Follow the steps in the Open a Project in the SDK section.
- Copy the following files from \hello\platforms\android\res\drawable-hdpi directory into the \native\res\drawable-hdpi directory of your Worklight V6.2 project:
ic_action_next_item.png
ic_action_previous_item.png
ic_action_remove.png
This problem is resolved by APAR PI21653.
[{"Product":{"code":"SSZH4A","label":"IBM Worklight"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Application Development","Platform":[{"code":"PF003","label":"Android"}],"Version":"6.2","Edition":"Consumer;Enterprise","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
More support for:
IBM Worklight
Software version:
6.2
Operating system(s):
Android
Document number:
246981
Modified date:
17 June 2018
UID
swg21681060