有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

ibm mobilefirst ibm Worklight 6.0“捕获API模拟已禁用(未加载小程序,请检查Java设置)”

我正在尝试为Android(2.2)开发一个混合应用程序

当我尝试在Worklight Console的MBS中预览应用程序时,它无法正常工作
我得到以下信息:

Capture API simulation is disabled (applet not loaded, please check your Java settings)

有没有办法在worklight项目的浏览器模拟器上模拟文件API

enter image description here

Logcat文件:

07-05 23:00:24.977: I/dalvikvm(882): Could not find method org.apache.cordova.CordovaWebView.setOverScrollMode, referenced from method org.apache.cordova.DroidGap.init
07-05 23:00:24.977: W/dalvikvm(882): VFY: unable to resolve virtual method 12024: Lorg/apache/cordova/CordovaWebView;.setOverScrollMode (I)V
07-05 23:00:24.977: D/dalvikvm(882): VFY: replacing opcode 0x6e at 0x0043
07-05 23:00:25.027: I/CordovaLog(882): Changing log level to DEBUG(3)
07-05 23:00:25.037: I/CordovaLog(882): Found preference for exit-on-suspend=false
07-05 23:00:25.037: D/CordovaLog(882): Found preference for exit-on-suspend=false
07-05 23:00:25.037: D/DroidGap(882): DroidGap.onCreate()
07-05 23:00:25.087: I/dalvikvm(882): Could not find method 安卓.webkit.WebView.<init>, referenced from method org.apache.cordova.CordovaWebView.<init>
07-05 23:00:25.087: W/dalvikvm(882): VFY: unable to resolve direct method 536: L安卓/webkit/WebView;.<init> (L安卓/content/Context;L安卓/util/AttributeSet;IZ)V
07-05 23:00:25.097: D/dalvikvm(882): VFY: replacing opcode 0x70 at 0x0001
07-05 23:00:25.097: D/dalvikvm(882): VFY: dead code 0x0004-0046 in Lorg/apache/cordova/CordovaWebView;.<init> (L安卓/content/Context;L安卓/util/AttributeSet;IZ)V
07-05 23:00:25.474: D/JsMessageQueue(882): Set native->JS mode to 2
07-05 23:00:25.474: I/CordovaWebView(882): Disabled addJavascriptInterface() bridge since Android version is old.
07-05 23:00:25.477: E/dalvikvm(882): Could not find class '安卓.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.getWhitelistResponse
07-05 23:00:25.477: W/dalvikvm(882): VFY: unable to resolve new-instance 176 (L安卓/webkit/WebResourceResponse;) in Lorg/apache/cordova/CordovaWebViewClient;
07-05 23:00:25.477: D/dalvikvm(882): VFY: replacing opcode 0x22 at 0x000b
07-05 23:00:25.477: D/dalvikvm(882): VFY: dead code 0x000d-0014 in Lorg/apache/cordova/CordovaWebViewClient;.getWhitelistResponse ()L安卓/webkit/WebResourceResponse;
07-05 23:00:25.487: W/dalvikvm(882): VFY: unable to find class referenced in signature (L安卓/webkit/WebResourceResponse;)
07-05 23:00:25.487: W/dalvikvm(882): VFY: unable to find class referenced in signature (L安卓/webkit/WebResourceResponse;)
07-05 23:00:25.487: W/dalvikvm(882): VFY: unable to find class referenced in signature (L安卓/webkit/WebResourceResponse;)
07-05 23:00:25.497: D/DroidGap(882): DroidGap.init()
07-05 23:00:25.577: I/UICAndroid(882): {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-05 23:00:25.747: D/dalvikvm(882): GC_FOR_MALLOC freed 3453 objects / 246152 bytes in 82ms
07-05 23:00:25.807: I/UICAndroid(882): Screen height:800  Screen width420
07-05 23:00:25.857: D/DroidGap(882): Resuming the App
07-05 23:00:25.958: I/UICAndroid(882): Network changed
07-05 23:00:26.039: D/SoftKeyboardDetect(882): Ignore this event
07-05 23:00:26.267: D/SoftKeyboardDetect(882): Ignore this event
07-05 23:00:26.727: I/UICAndroid(882): Did Client State change?: true
07-05 23:00:26.727: D/WLDroidGap(882): New installation/upgrade detected, copying resources and saving new checksum
07-05 23:00:27.597: D/dalvikvm(882): GC_FOR_MALLOC freed 5486 objects / 430472 bytes in 74ms
07-05 23:00:28.356: D/WLDroidGap(882): Started copying files to local storage...
07-05 23:00:29.396: D/dalvikvm(882): GC_FOR_MALLOC freed 6694 objects / 546808 bytes in 93ms
07-05 23:00:30.476: D/dalvikvm(882): GC_FOR_MALLOC freed 1812 objects / 191688 bytes in 62ms
07-05 23:00:31.576: D/dalvikvm(882): GC_FOR_MALLOC freed 1391 objects / 485536 bytes in 179ms
07-05 23:00:32.676: D/dalvikvm(882): GC_FOR_MALLOC freed 2198 objects / 523072 bytes in 65ms
07-05 23:00:34.506: D/dalvikvm(882): GC_FOR_MALLOC freed 2290 objects / 521368 bytes in 181ms
07-05 23:00:35.696: D/dalvikvm(882): GC_FOR_MALLOC freed 2197 objects / 524096 bytes in 58ms
07-05 23:00:35.996: D/dalvikvm(882): GC_FOR_MALLOC freed 1971 objects / 525400 bytes in 135ms
07-05 23:00:37.336: D/dalvikvm(882): GC_FOR_MALLOC freed 2247 objects / 523224 bytes in 62ms
07-05 23:00:40.046: D/dalvikvm(882): GC_FOR_MALLOC freed 2475 objects / 524968 bytes in 57ms
07-05 23:00:40.776: D/WLDroidGap(882): Finished copying files to local storage...
07-05 23:00:40.786: D/WLDroidGap(882): no need to check web resource integrity
07-05 23:00:40.817: D/CordovaWebView(882): >>> loadUrl(file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-05 23:00:40.817: D/PluginManager(882): init()
07-05 23:00:40.836: D/CordovaWebView(882): >>> loadUrlNow()
07-05 23:00:40.937: D/DroidGap(882): onMessage(onPageStarted,file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-05 23:00:41.036: D/dalvikvm(882): GC_FOR_MALLOC freed 2229 objects / 459768 bytes in 68ms
07-05 23:00:42.786: D/Cordova(882): onPageFinished(file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-05 23:00:42.786: D/Cordova(882): Trying to fire onNativeReady
07-05 23:00:42.801: D/DroidGap(882): onMessage(onNativeReady,null)
07-05 23:00:42.801: D/DroidGap(882): onMessage(onPageFinished,file:///data/data/com.AccordFintech/files/www/skinLoader.html)
07-05 23:00:44.437: D/CordovaLog(882): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
07-05 23:00:44.437: I/Web Console(882): 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-05 23:00:44.637: D/CordovaNetworkManager(882): Connection Type: 3g
07-05 23:00:44.686: D/CordovaNetworkManager(882): Connection Type: 3g
07-05 23:00:44.686: D/DroidGap(882): onMessage(networkconnection,3g)
07-05 23:00:44.739: D/DroidGap(882): onMessage(spinner,stop)
07-05 23:00:44.866: D/DroidGap(882): onMessage(spinner,stop)
07-05 23:00:44.897: D/CordovaWebView(882): >>> loadUrl(file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-05 23:00:44.897: D/PluginManager(882): init()
07-05 23:00:44.907: D/CordovaWebView(882): >>> loadUrlNow()
07-05 23:00:45.039: D/DroidGap(882): onMessage(onPageStarted,file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-05 23:00:45.457: D/dalvikvm(882): GC_FOR_MALLOC freed 2830 objects / 242744 bytes in 226ms
07-05 23:00:45.837: D/dalvikvm(882): GC_FOR_MALLOC freed 1592 objects / 128808 bytes in 87ms
07-05 23:00:47.457: D/dalvikvm(882): GC_FOR_MALLOC freed 2282 objects / 664128 bytes in 73ms
07-05 23:00:55.006: D/Cordova(882): onPageFinished(file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-05 23:00:55.006: D/Cordova(882): Trying to fire onNativeReady
07-05 23:00:55.006: D/DroidGap(882): onMessage(onNativeReady,null)
07-05 23:00:55.006: D/DroidGap(882): onMessage(onPageFinished,file:///data/data/com.AccordFintech/files/www/default/AccordFintech.html)
07-05 23:00:55.928: D/CordovaLog(882): Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.
07-05 23:00:55.928: I/Web Console(882): 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-05 23:00:55.986: D/CordovaNetworkManager(882): Connection Type: 3g
07-05 23:00:56.016: D/CordovaNetworkManager(882): Connection Type: 3g
07-05 23:00:56.016: D/DroidGap(882): onMessage(networkconnection,3g)
07-05 23:00:56.046: D/DroidGap(882): onMessage(spinner,stop)
07-05 23:00:56.246: I/dalvikvm(882): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-05 23:00:56.246: W/dalvikvm(882): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-05 23:00:56.246: D/dalvikvm(882): VFY: replacing opcode 0x74 at 0x009d
07-05 23:00:56.246: I/dalvikvm(882): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-05 23:00:56.246: W/dalvikvm(882): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-05 23:00:56.246: D/dalvikvm(882): VFY: replacing opcode 0x74 at 0x00d0
07-05 23:00:56.246: I/dalvikvm(882): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-05 23:00:56.246: W/dalvikvm(882): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-05 23:00:56.246: D/dalvikvm(882): VFY: replacing opcode 0x74 at 0x00e3
07-05 23:00:56.246: I/dalvikvm(882): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames
07-05 23:00:56.246: W/dalvikvm(882): VFY: unable to resolve virtual method 10795: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;
07-05 23:00:56.246: D/dalvikvm(882): VFY: replacing opcode 0x74 at 0x00f2
07-05 23:00:56.246: D/dalvikvm(882): VFY: dead code 0x00a0-00b8 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-05 23:00:56.246: D/dalvikvm(882): VFY: dead code 0x00d3-00d4 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-05 23:00:56.246: D/dalvikvm(882): VFY: dead code 0x00e6-00e7 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-05 23:00:56.246: D/dalvikvm(882): VFY: dead code 0x00f5-0118 in Lorg/apache/cordova/Globalization;.getDateNames (Lorg/json/JSONArray;)Lorg/json/JSONObject;
07-05 23:00:56.386: D/AccordFintech(882): wlclient init started
07-05 23:00:56.426: D/AccordFintech(882): Read cookies: null
07-05 23:00:56.426: D/AccordFintech(882): CookieMgr read cookies: {}
07-05 23:00:56.906: D/AccordFintech(882): before: app init onSuccess
07-05 23:00:57.126: D/dalvikvm(882): GC_FOR_MALLOC freed 8237 objects / 460104 bytes in 153ms
07-05 23:00:57.126: D/AccordFintech(882): after: app init onSuccess
07-05 23:00:57.146: D/AccordFintech(882): added onPause event handler 
07-05 23:00:57.146: D/AccordFintech(882): wlclient init success
07-05 23:01:03.536: D/CordovaLog(882): Error: scriptError
07-05 23:01:03.536: E/Web Console(882): Error: scriptError at file:///data/data/com.AccordFintech/files/www/default/dojo/dojo.js:21
07-05 23:01:03.536: D/CordovaLog(882): Error: scriptError
07-05 23:01:03.536: E/Web Console(882): Error: scriptError at file:///data/data/com.AccordFintech/files/www/default/dojo/dojo.js:21

共 (1) 个答案

  1. # 1 楼答案

    在浏览器的设置中查找Java设置,并确保它们已启用

    假设您使用的是Chrome:Java and Google Chrome browser
    如果您使用的是其他浏览器,请搜索相同的浏览器,但要搜索您选择的浏览器

    一旦您管理了上述内容,文件、捕获API等都将成为可能