-2

I have tried to built a hybrid application using dojo 1.9 toolkit with worklight 6.0. for android environment 2.3. After finishing it when i tried to run this on simulator, it works perfectly. But when i tried this on AVD, the app just flashes a blank screen and exit without displaying any error message or anything else. It seems that it fails to load dojo stuffs. Can't figure out the reason of this ? Is there any certain changes that i have to do in order to run my application either on AVD or device?

Log cat :

07-10 15:15:31.578: I/CordovaLog(534): Changing log level to DEBUG(3)
07-10 15:15:31.618: I/CordovaLog(534): Found preference for exit-on-suspend=false
07-10 15:15:31.618: D/CordovaLog(534): Found preference for exit-on-suspend=false
07-10 15:15:31.618: D/DroidGap(534): DroidGap.onCreate()
07-10 15:15:31.728: I/dalvikvm(534): Could not find method android.webkit.WebView.<init>, referenced from method org.apache.cordova.CordovaWebView.<init>
07-10 15:15:31.728: W/dalvikvm(534): VFY: unable to resolve direct method 536: Landroid/webkit/WebView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V
07-10 15:15:31.728: D/dalvikvm(534): VFY: replacing opcode 0x70 at 0x0001
07-10 15:15:31.728: D/dalvikvm(534): VFY: dead code 0x0004-0046 in Lorg/apache/cordova/CordovaWebView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V
07-10 15:15:31.908: D/dalvikvm(534): GC_EXTERNAL_ALLOC freed 106K, 51% free 2685K/5447K, external 992K/1038K, paused 105ms
07-10 15:15:32.178: D/JsMessageQueue(534): Set native->JS mode to 2
07-10 15:15:32.188: I/CordovaWebView(534): Disabled addJavascriptInterface() bridge callback due to a bug on the 2.3 emulator
07-10 15:15:32.198: E/dalvikvm(534): Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.getWhitelistResponse
07-10 15:15:32.198: W/dalvikvm(534): VFY: unable to resolve new-instance 176 (Landroid/webkit/WebResourceResponse;) in Lorg/apache/cordova/CordovaWebViewClient;
07-10 15:15:32.198: D/dalvikvm(534): VFY: replacing opcode 0x22 at 0x000b
07-10 15:15:32.198: D/dalvikvm(534): VFY: dead code 0x000d-0014 in Lorg/apache/cordova/CordovaWebViewClient;.getWhitelistResponse ()Landroid/webkit/WebResourceResponse;
07-10 15:15:32.238: W/dalvikvm(534): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
07-10 15:15:32.238: W/dalvikvm(534): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
07-10 15:15:32.238: W/dalvikvm(534): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
07-10 15:15:32.268: D/DroidGap(534): DroidGap.init()
07-10 15:15:32.348: I/UICAndroid(534): {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-10 15:15:32.428: I/UICAndroid(534): Screen height:800  Screen width420
07-10 15:15:32.448: D/DroidGap(534): Resuming the App
07-10 15:15:32.538: I/UICAndroid(534): Network changed
07-10 15:15:32.578: D/SoftKeyboardDetect(534): Ignore this event
07-10 15:15:32.658: D/SoftKeyboardDetect(534): Ignore this event
07-10 15:15:33.128: I/UICAndroid(534): Did Client State change?: true
07-10 15:15:33.128: D/WLDroidGap(534): New installation/upgrade detected, copying resources and saving new checksum
07-10 15:15:34.188: D/dalvikvm(534): GC_CONCURRENT freed 328K, 52% free 2850K/5831K, external 1145K/1657K, paused 5ms+5ms
07-10 15:15:39.818: D/WLDroidGap(534): Started copying files to local storage...
07-10 15:15:41.032: D/szipinf(534): Initializing inflate state
07-10 15:15:41.038: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:43.379: D/szipinf(534): Initializing inflate state
07-10 15:15:43.389: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:43.998: D/dalvikvm(534): GC_CONCURRENT freed 470K, 53% free 2838K/5959K, external 1145K/1657K, paused 14ms+5ms
07-10 15:15:45.357: D/dalvikvm(534): GC_CONCURRENT freed 478K, 54% free 2822K/6023K, external 1145K/1657K, paused 6ms+3ms
07-10 15:15:45.588: D/szipinf(534): Initializing inflate state
07-10 15:15:45.588: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:46.457: D/dalvikvm(534): GC_CONCURRENT freed 396K, 54% free 2823K/6023K, external 1145K/1657K, paused 6ms+6ms
07-10 15:15:49.238: D/dalvikvm(534): GC_CONCURRENT freed 407K, 54% free 2823K/6023K, external 1145K/1657K, paused 6ms+4ms
07-10 15:15:49.958: D/szipinf(534): Initializing inflate state
07-10 15:15:49.958: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:51.028: D/dalvikvm(534): GC_CONCURRENT freed 413K, 54% free 2826K/6023K, external 1145K/1657K, paused 6ms+4ms
07-10 15:15:51.698: D/dalvikvm(534): GC_CONCURRENT freed 391K, 54% free 2825K/6023K, external 1145K/1657K, paused 6ms+3ms
07-10 15:15:52.708: D/szipinf(534): Initializing inflate state
07-10 15:15:52.708: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:53.548: D/dalvikvm(534): GC_CONCURRENT freed 410K, 54% free 2818K/6023K, external 1145K/1657K, paused 5ms+3ms
07-10 15:15:55.148: D/dalvikvm(534): GC_CONCURRENT freed 401K, 54% free 2815K/6023K, external 884K/1396K, paused 5ms+3ms
07-10 15:15:55.198: D/szipinf(534): Initializing inflate state
07-10 15:15:55.198: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:55.968: D/szipinf(534): Initializing inflate state
07-10 15:15:55.993: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:56.118: D/szipinf(534): Initializing inflate state
07-10 15:15:56.140: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:58.049: D/szipinf(534): Initializing inflate state
07-10 15:15:58.049: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:59.038: D/szipinf(534): Initializing inflate state
07-10 15:15:59.038: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:59.238: D/dalvikvm(534): GC_CONCURRENT freed 396K, 54% free 2810K/6023K, external 884K/1396K, paused 4ms+5ms
07-10 15:15:59.258: D/szipinf(534): Initializing inflate state
07-10 15:15:59.258: D/szipinf(534): Initializing zlib to inflate
07-10 15:15:59.351: D/WLDroidGap(534): Finished copying files to local storage...
07-10 15:15:59.390: D/WLDroidGap(534): no need to check web resource integrity
07-10 15:15:59.448: D/CordovaWebView(534): >>> loadUrl(file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-10 15:15:59.448: D/PluginManager(534): init()
07-10 15:15:59.458: D/CordovaWebView(534): >>> loadUrlNow()
07-10 15:15:59.568: D/DroidGap(534): onMessage(onPageStarted,file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-10 15:15:59.838: D/dalvikvm(534): GC_CONCURRENT freed 192K, 49% free 3123K/6023K, external 884K/1396K, paused 5ms+4ms
07-10 15:16:00.538: D/Cordova(534): onPageFinished(file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-10 15:16:00.538: D/Cordova(534): Trying to fire onNativeReady
07-10 15:16:00.538: D/DroidGap(534): onMessage(onNativeReady,null)
07-10 15:16:00.548: D/DroidGap(534): onMessage(onPageFinished,file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-10 15:16:01.228: D/CordovaLog(534): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
07-10 15:16:01.228: I/Web Console(534): 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-10 15:16:01.298: D/CordovaNetworkManager(534): Connection Type: 3g
07-10 15:16:01.298: D/CordovaNetworkManager(534): Connection Type: 3g
07-10 15:16:01.298: D/DroidGap(534): onMessage(networkconnection,3g)
07-10 15:16:01.318: D/DroidGap(534): onMessage(spinner,stop)
07-10 15:16:01.488: D/CordovaWebView(534): >>> loadUrl(file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-10 15:16:01.488: D/PluginManager(534): init()
07-10 15:16:01.531: D/CordovaWebView(534): >>> loadUrlNow()
07-10 15:16:01.567: D/DroidGap(534): onMessage(onPageStarted,file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-10 15:16:01.837: D/dalvikvm(534): GC_CONCURRENT freed 234K, 46% free 3432K/6279K, external 884K/1396K, paused 6ms+3ms
07-10 15:16:02.577: D/DroidGap(534): onMessage(spinner,stop)
07-10 15:16:04.787: D/dalvikvm(534): GC_CONCURRENT freed 297K, 45% free 3632K/6599K, external 884K/1396K, paused 4ms+13ms
07-10 15:16:08.308: D/Cordova(534): onPageFinished(file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-10 15:16:08.308: D/Cordova(534): Trying to fire onNativeReady
07-10 15:16:08.308: D/DroidGap(534): onMessage(onNativeReady,null)
07-10 15:16:08.308: D/DroidGap(534): onMessage(onPageFinished,file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-10 15:16:09.028: D/CordovaLog(534): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
07-10 15:16:09.028: I/Web Console(534): 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-10 15:16:09.118: D/CordovaNetworkManager(534): Connection Type: 3g
07-10 15:16:09.128: D/CordovaNetworkManager(534): Connection Type: 3g
07-10 15:16:09.128: D/DroidGap(534): onMessage(networkconnection,3g)
07-10 15:16:09.158: D/DroidGap(534): onMessage(spinner,stop)
07-10 15:16:09.458: D/AccordFintech(534): wlclient init started
07-10 15:16:09.498: D/AccordFintech(534): Read cookies: null
07-10 15:16:09.498: D/AccordFintech(534): CookieMgr read cookies: {}
07-10 15:16:09.508: W/dalvikvm(534): JNI WARNING: jarray 0x4066ecf8 points to non-array object (Ljava/lang/String;)
07-10 15:16:09.508: I/dalvikvm(534): "WebViewCoreThread" prio=5 tid=9 NATIVE
07-10 15:16:09.528: I/dalvikvm(534):   | group="main" sCount=0 dsCount=0 obj=0x40546720 self=0x1e9550
07-10 15:16:09.528: I/dalvikvm(534):   | sysTid=543 nice=0 sched=0/0 cgrp=default handle=2064104
07-10 15:16:09.528: I/dalvikvm(534):   | schedstat=( 8960762668 1565189783 688 )
07-10 15:16:09.528: I/dalvikvm(534):   at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
07-10 15:16:09.528: I/dalvikvm(534):   at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
07-10 15:16:09.528: I/dalvikvm(534):   at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:91)
07-10 15:16:09.528: I/dalvikvm(534):   at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108)
07-10 15:16:09.528: I/dalvikvm(534):   at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 15:16:09.528: I/dalvikvm(534):   at android.os.Looper.loop(Looper.java:123)
07-10 15:16:09.528: I/dalvikvm(534):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:629)
07-10 15:16:09.528: I/dalvikvm(534):   at java.lang.Thread.run(Thread.java:1019)
07-10 15:16:09.528: E/dalvikvm(534): VM aborting
Shihab Uddin
  • 6,699
  • 2
  • 59
  • 74
UjjawalKr
  • 241
  • 1
  • 4
  • 20
  • possible duplicate of [IBM Worklight 6.0 - Unable to run sample hybrid worklight app using dojo toolkit for android environment on avd?](http://stackoverflow.com/questions/17543927/ibm-worklight-6-0-unable-to-run-sample-hybrid-worklight-app-using-dojo-toolkit) – Idan Adar Jul 10 '13 at 10:34

1 Answers1

0

Google has a bug in AVD running Android 2.3; no matter what you'll try to run on it, it'll crash/not work.

Use either Android 2.2 or Android 4.x for your AVD.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • ok but when i tried to run it on actual device also, it results a blank white screen? It seems like it fails to load all dojo stuffs. – UjjawalKr Jul 10 '13 at 10:12
  • please tell me if i have to make certain changes in the generated files to make it work ? – UjjawalKr Jul 10 '13 at 10:13
  • In 2.2 it will fail due to Dojo issues, and you have already an open question about it. In this question you wrote "2.3", and it will fail in 2.3 regardless of Dojo. I don't know the solution for your Dojo questions. – Idan Adar Jul 10 '13 at 10:20
  • Is there any documentation to create, build and deploy the dojo enabled hybrid application ? – UjjawalKr Jul 10 '13 at 10:28
  • You already created a question for this. Use it. http://stackoverflow.com/questions/17543927/ibm-worklight-6-0-unable-to-run-sample-hybrid-worklight-app-using-dojo-toolkit – Idan Adar Jul 10 '13 at 10:34