I have developed a sample hybrid application using worklight 6.0 and dojo toolkit 1.9 for android environment2.2.
When i tested this application on simulator it works fine. But when i tried it on AVD or on actual device, it runs but displays a blank screen only.
Can't understand what to do to make it work on actual device properly?
When i tried it to run on AVD i noticed following list of errors:
07-08 19:51:22.462: I/dalvikvm(664): Could not find method org.apache.cordova.CordovaWebView.setOverScrollMode, referenced from method org.apache.cordova.DroidGap.init
07-08 19:51:22.462: W/dalvikvm(664): VFY: unable to resolve virtual method 12024: Lorg/apache/cordova/CordovaWebView;.setOverScrollMode (I)V
07-08 19:51:22.462: D/dalvikvm(664): VFY: replacing opcode 0x6e at 0x0043
07-08 19:51:22.502: I/CordovaLog(664): Changing log level to DEBUG(3)
07-08 19:51:22.502: I/CordovaLog(664): Found preference for exit-on-suspend=false
07-08 19:51:22.502: D/CordovaLog(664): Found preference for exit-on-suspend=false
07-08 19:51:22.502: D/DroidGap(664): DroidGap.onCreate()
07-08 19:51:22.552: I/dalvikvm(664): Could not find method android.webkit.WebView.<init>, referenced from method org.apache.cordova.CordovaWebView.<init>
07-08 19:51:22.552: W/dalvikvm(664): VFY: unable to resolve direct method 536: Landroid/webkit/WebView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V
07-08 19:51:22.552: D/dalvikvm(664): VFY: replacing opcode 0x70 at 0x0001
07-08 19:51:22.552: D/dalvikvm(664): VFY: dead code 0x0004-0046 in Lorg/apache/cordova/CordovaWebView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V
07-08 19:51:22.852: D/JsMessageQueue(664): Set native->JS mode to 2
07-08 19:51:22.852: I/CordovaWebView(664): Disabled addJavascriptInterface() bridge since Android version is old.
07-08 19:51:22.852: E/dalvikvm(664): Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.getWhitelistResponse
07-08 19:51:22.852: W/dalvikvm(664): VFY: unable to resolve new-instance 176 (Landroid/webkit/WebResourceResponse;) in Lorg/apache/cordova/CordovaWebViewClient;
07-08 19:51:22.852: D/dalvikvm(664): VFY: replacing opcode 0x22 at 0x000b
07-08 19:51:22.852: D/dalvikvm(664): VFY: dead code 0x000d-0014 in Lorg/apache/cordova/CordovaWebViewClient;.getWhitelistResponse ()Landroid/webkit/WebResourceResponse;
07-08 19:51:22.872: W/dalvikvm(664): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
07-08 19:51:22.892: W/dalvikvm(664): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
07-08 19:51:22.892: W/dalvikvm(664): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
07-08 19:51:23.012: D/DroidGap(664): DroidGap.init()
07-08 19:51:23.122: I/UICAndroid(664): {LoggingLevel=3, AddCookieDomain=false, PostMessageTimeout=60000, CookiePath=/, CookieParam=, KillSwitchTimeInterval=180, BufferPercent=20, HasToPersistLocalCache=true , MessageTypeHeader=WorklightHit, CookieDomain=, WhiteListParam=id, LibraryVersion=8.8.1.0, MaskIdList=com.tealeaf.sp:id/EditText*,com.tealeaf.sp:id/login.password, PostMessageLevelWiFi=3, UseRandomSample=false, KillSwitchMaxNumberOfTries=3, SensitiveCapitalCaseAlphabet=X, FilterMessageTypes=true, PostMessageTimeIntervals=30, SensitiveSmallCaseAlphabet=x, CompressPostMessage=true, PostMessageMaxBytesSize=20000, SensitiveSymbol=#, PostMessageLevelCellular=3, MessageTypes=4,5,6, PostMessageSocketTimeout=60000, CookieUrl=, UseWhiteList=true, KillSwitchUrl=, KillSwitchEnabled=false, MessageVersion=2.1.0.0, HasMasking=true, TimeIntervalBetweenSnapshots=60, PostMessageUrl=@USE_WORKLIGHT_DEFAULT@, CachedFileMaxBytesSize=512000, BufferLimit=100, AddCookiePath=false, SensitiveNumber=9, CachingLevel=3, ManualPostEnabled=true, HasCustomMask=true, DisplayLogging=true, MaxStringsLength=300, AddMessageTypeHeader=true, RandomSampleParam=, DoPostOnIntervals=false}
07-08 19:51:23.232: D/dalvikvm(664): GC_FOR_MALLOC freed 3250 objects / 238920 bytes in 63ms
07-08 19:51:23.262: I/UICAndroid(664): Screen height:800 Screen width420
07-08 19:51:23.342: D/DroidGap(664): Resuming the App
07-08 19:51:23.402: I/UICAndroid(664): Network changed
07-08 19:51:23.432: D/SoftKeyboardDetect(664): Ignore this event
07-08 19:51:23.502: D/WLDroidGap(664): New installation/upgrade detected, copying resources and saving new checksum
07-08 19:51:23.542: D/SoftKeyboardDetect(664): Ignore this event
07-08 19:51:23.732: I/UICAndroid(664): Did Client State change?: true
07-08 19:51:26.842: D/dalvikvm(664): GC_FOR_MALLOC freed 5447 objects / 429112 bytes in 71ms
07-08 19:51:31.494: D/WLDroidGap(664): Started copying files to local storage...
07-08 19:51:32.402: D/dalvikvm(664): GC_FOR_MALLOC freed 6653 objects / 552224 bytes in 58ms
07-08 19:51:34.072: D/dalvikvm(664): GC_FOR_MALLOC freed 1876 objects / 203720 bytes in 50ms
07-08 19:51:35.341: D/dalvikvm(664): GC_FOR_MALLOC freed 1528 objects / 494368 bytes in 71ms
07-08 19:51:36.441: D/dalvikvm(664): GC_FOR_MALLOC freed 2070 objects / 515744 bytes in 61ms
07-08 19:51:38.511: D/dalvikvm(664): GC_FOR_MALLOC freed 2270 objects / 520176 bytes in 64ms
07-08 19:51:40.661: D/dalvikvm(664): GC_FOR_MALLOC freed 2191 objects / 523952 bytes in 52ms
07-08 19:51:41.061: D/dalvikvm(664): GC_FOR_MALLOC freed 1969 objects / 525120 bytes in 65ms
07-08 19:51:42.782: D/dalvikvm(664): GC_FOR_MALLOC freed 2305 objects / 526720 bytes in 52ms
07-08 19:51:46.472: D/dalvikvm(664): GC_FOR_MALLOC freed 2529 objects / 529368 bytes in 52ms
07-08 19:51:47.993: D/WLDroidGap(664): Finished copying files to local storage...
07-08 19:51:48.012: D/WLDroidGap(664): no need to check web resource integrity
07-08 19:51:48.102: D/CordovaWebView(664): >>> loadUrl(file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-08 19:51:48.102: D/PluginManager(664): init()
07-08 19:51:48.112: D/CordovaWebView(664): >>> loadUrlNow()
07-08 19:51:48.592: D/DroidGap(664): onMessage(onPageStarted,file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-08 19:51:48.792: D/dalvikvm(664): GC_FOR_MALLOC freed 2184 objects / 422000 bytes in 81ms
07-08 19:51:49.592: D/Cordova(664): onPageFinished(file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-08 19:51:49.592: D/Cordova(664): Trying to fire onNativeReady
07-08 19:51:49.592: D/DroidGap(664): onMessage(onNativeReady,null)
07-08 19:51:49.592: D/DroidGap(664): onMessage(onPageFinished,file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-08 19:51:50.232: D/CordovaLog(664): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
07-08 19:51:50.232: I/Web Console(664): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. at file:///data/data/com.AccordFintech/files/www/default/wlclient/js/cordova.js:908
07-08 19:51:50.322: D/CordovaNetworkManager(664): Connection Type: 3g
07-08 19:51:50.322: D/CordovaNetworkManager(664): Connection Type: 3g
07-08 19:51:50.322: D/DroidGap(664): onMessage(networkconnection,3g)
07-08 19:51:50.352: D/DroidGap(664): onMessage(spinner,stop)
07-08 19:51:50.492: D/CordovaWebView(664): >>> loadUrl(file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-08 19:51:50.492: D/PluginManager(664): init()
07-08 19:51:50.512: D/CordovaWebView(664): >>> loadUrlNow()
07-08 19:51:50.532: D/DroidGap(664): onMessage(onPageStarted,file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-08 19:51:50.733: D/dalvikvm(664): GC_FOR_MALLOC freed 2859 objects / 241376 bytes in 121ms
07-08 19:51:50.912: D/dalvikvm(664): GC_FOR_MALLOC freed 1560 objects / 135728 bytes in 54ms
07-08 19:51:51.622: D/DroidGap(664): onMessage(spinner,stop)
07-08 19:51:53.622: D/dalvikvm(664): GC_FOR_MALLOC freed 1225 objects / 370792 bytes in 153ms
07-08 19:51:56.991: D/Cordova(664): onPageFinished(file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-08 19:51:56.991: D/Cordova(664): Trying to fire onNativeReady
07-08 19:51:56.991: D/DroidGap(664): onMessage(onNativeReady,null)
07-08 19:51:56.991: D/DroidGap(664): onMessage(onPageFinished,file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-08 19:51:57.641: D/CordovaLog(664): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
07-08 19:51:57.641: I/Web Console(664): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. at file:///data/data/com.AccordFintech/files/www/default/wlclient/js/cordova.js:908
07-08 19:51:57.702: D/CordovaNetworkManager(664): Connection Type: 3g
07-08 19:51:57.721: D/CordovaNetworkManager(664): Connection Type: 3g
07-08 19:51:57.721: D/DroidGap(664): onMessage(networkconnection,3g)
07-08 19:51:57.741: D/DroidGap(664): onMessage(spinner,stop)
07-08 19:51:57.911: I/dalvikvm(664): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-08 19:51:57.911: W/dalvikvm(664): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-08 19:51:57.911: D/dalvikvm(664): VFY: replacing opcode 0x74 at 0x009d
07-08 19:51:57.911: I/dalvikvm(664): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-08 19:51:57.911: W/dalvikvm(664): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-08 19:51:57.911: D/dalvikvm(664): VFY: replacing opcode 0x74 at 0x00d0
07-08 19:51:57.911: I/dalvikvm(664): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-08 19:51:57.911: W/dalvikvm(664): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-08 19:51:57.922: D/dalvikvm(664): VFY: replacing opcode 0x74 at 0x00e3
07-08 19:51:57.922: I/dalvikvm(664): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-08 19:51:57.922: W/dalvikvm(664): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-08 19:51:57.922: D/dalvikvm(664): VFY: replacing opcode 0x74 at 0x00f2
07-08 19:51:57.922: D/dalvikvm(664): VFY: dead code 0x00a0-00b8 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-08 19:51:57.922: D/dalvikvm(664): VFY: dead code 0x00d3-00d4 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-08 19:51:57.922: D/dalvikvm(664): VFY: dead code 0x00e6-00e7 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-08 19:51:57.922: D/dalvikvm(664): VFY: dead code 0x00f5-0118 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-08 19:51:58.061: D/AccordFintech(664): wlclient init started
07-08 19:51:58.081: D/AccordFintech(664): Read cookies: null
07-08 19:51:58.091: D/AccordFintech(664): CookieMgr read cookies: {}
07-08 19:51:58.261: D/dalvikvm(664): GC_FOR_MALLOC freed 5659 objects / 415552 bytes in 64ms
07-08 19:51:58.541: D/AccordFintech(664): before: app init onSuccess
07-08 19:51:58.621: D/AccordFintech(664): after: app init onSuccess
07-08 19:51:58.621: D/AccordFintech(664): added onPause event handler
07-08 19:51:58.631: D/AccordFintech(664): wlclient init