我的webview无法在我的应用程序上运行,它在本地存储文件时起作用

时间:2013-10-06 15:52:09

标签: android eclipse cordova webview

我的问题是,我曾经使用带有cordova的super.Loadurl代码导致文件:/// android_asset /目录,并且它工作正常..一切都是100%,需要加载但是它正在工作精细。然后,我在我的网站上托管了我的文件,从应用程序中取出了惊人的197mb,使其更轻,可上传,但它给了我一个“应用程序错误 - 与服务器的连接不成功”然后我尝试使用“webview”代码并将其与示例“www.google.com”一起使用,效果很好。我尝试使用我的网站,它会将屏幕颜色更改为我网站中的bg,但没有其他任何内容会显示出来。那么我尝试用一​​个小文本制作一个简单的html文件,并将index.html更改为它,并且它加载了文本。我迷路了,我不知道该尝试什么或做什么。请有人带领我朝着正确的方向前进。

`110-06 12:15:26.355: D/dalvikvm(1102): GC_FOR_ALLOC freed 46K, 5% free 2933K/3084K, paused 61ms, total 63ms
10-06 12:15:26.565: D/dalvikvm(1102): GC_FOR_ALLOC freed 291K, 12% free 3156K/3548K, paused 18ms, total 20ms
10-06 12:15:26.604: D/dalvikvm(1102): GC_FOR_ALLOC freed 2K, 9% free 3258K/3548K, paused 25ms, total 26ms
10-06 12:15:26.604: I/dalvikvm-heap(1102): Grow heap (frag case) to 4.353MB for 1127536-byte allocation
10-06 12:15:26.654: D/dalvikvm(1102): GC_FOR_ALLOC freed <1K, 7% free 4359K/4652K, paused 43ms, total 43ms
10-06 12:15:27.074: E/ActivityThread(1102): Failed to find provider info for com.google.plus.platform
10-06 12:15:27.084: I/Ads(1102): To get test ads on this device, call adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
10-06 12:15:27.714: D/dalvikvm(1102): DexOpt: --- BEGIN 'ads1928896260.jar' (bootstrap=0) ---
10-06 12:15:27.734: D/dalvikvm(1102): GC_FOR_ALLOC freed 322K, 9% free 4657K/5080K, paused 107ms, total 111ms
10-06 12:15:27.734: I/Choreographer(1102): Skipped 51 frames!  The application may be doing too much work on its main thread.
10-06 12:15:27.994: D/gralloc_goldfish(1102): Emulator without GPU emulation detected.
10-06 12:15:28.084: D/dalvikvm(1102): DexOpt: --- END 'ads1928896260.jar' (success) ---
10-06 12:15:28.084: D/dalvikvm(1102): DEX prep '/data/data/com.croruptdesigns.gtav_themanual/cache/ads1928896260.jar': unzip in 1ms, rewrite 362ms
10-06 12:15:28.335: I/Ads(1102): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_getSdkConstants();AFMA_buildAdURL({"preqs":0,"session_id":"17339870006830476368","seq_num":"1","slotname":"a1524e277372095","u_w":384,"msid":"com.croruptdesigns.gtav_themanual","cap":"m,a","js":"afma-sdk-a-v6.4.1","bas_off":0,"net":"ed","app_name":"1.android.com.croruptdesigns.gtav_themanual","hl":"en","gnt":3,"carrier":"310260","u_audio":4,"kw":[],"u_sd":2,"simulator":1,"ms":"CGmAthrKkyRp6xWcusoVxk_ntS2ZN59H63Qd8Jjg0ndLToWFNwJl32PSa2X8m09vF106i8Jsf_2BuJ6sG8m0duqbSvh8sZ7wgCPg5Rd7Tvxb63ZyO_lYyx7SMxpGtRjsleR2hmBLkYsdXrymwWPZDidE1qlU-Ahhjj8WjSrOPeHz7UpgEfKdxe35Xsk9iIqZoGkqf_QBAINQO63dItJW95a3d0jl9R9CLcmrNoZUTC4JSY6KVJIuvXYBBcRst9hy8sGl7Mkmt399rTsYelv_ZNU_NGTiz8OkaWBfVgvzeqhxSmgN5Eabfs_bdWsuQfB9W7sfVGqVAgnBHg2KPZ1mnw","isu":"B3EEABB8EE11C2BE770B684D95219ECB","format":"320x50_mb","oar":0,"ad_pos":{"height":0,"visible":1,"y":1152,"x":736,"width":0},"u_h":592,"pt":1,"bas_on":0,"ptime":0});</script></head><body></body></html>
10-06 12:15:29.984: I/Ads(1102): Received ad url: <url: "http://googleads.g.doubleclick.net:80/mads/gma?preqs=0&session_id=17339870006830476368&seq_num=1&u_w=384&msid=com.croruptdesigns.gtav_themanual&cap=m%2Ca&js=afma-sdk-a-v6.4.1&bas_off=0&net=ed&app_name=1.android.com.croruptdesigns.gtav_themanual&hl=en&gnt=3&carrier=310260&u_audio=4&kw&u_sd=2&ms=CGmAthrKkyRp6xWcusoVxk_ntS2ZN59H63Qd8Jjg0ndLToWFNwJl32PSa2X8m09vF106i8Jsf_2BuJ6sG8m0duqbSvh8sZ7wgCPg5Rd7Tvxb63ZyO_lYyx7SMxpGtRjsleR2hmBLkYsdXrymwWPZDidE1qlU-Ahhjj8WjSrOPeHz7UpgEfKdxe35Xsk9iIqZoGkqf_QBAINQO63dItJW95a3d0jl9R9CLcmrNoZUTC4JSY6KVJIuvXYBBcRst9hy8sGl7Mkmt399rTsYelv_ZNU_NGTiz8OkaWBfVgvzeqhxSmgN5Eabfs_bdWsuQfB9W7sfVGqVAgnBHg2KPZ1mnw&format=320x50_mb&oar=0&u_h=592&bas_on=0&ptime=0&imbf=%40installed_markets%40&u_so=p&output=html&region=mobile_app&u_tz=-240&client_sdk=1&ex=1&slotname=a1524e277372095&kw_type=broad&gsb=3g&caps=inlineVideo_interactiveVideo_mraid1_th_autoplay_mediation_sdkAdmobApiForAds_di&eisu=gkAjAmBMj3pCXLD39t1g2jfXkfrdgaKxkUlUxErHyL8lbW_DZ0Ax-0lWPhmyI4kVmCb2BcERmMkOa1W4aP02QZQuDw2BKjE_biobCXoJnC_R0BL3LCfhPy1JOkAAUEIy&et=58&jsv=56" type: "admob" afmaNotifyDt: "null" activationOverlayUrl: "null" useWebViewLoadUrl: "false">
10-06 12:15:30.034: I/Ads(1102): Ad url modified to http://googleads.g.doubleclick.net:80/mads/gma?preqs=0&session_id=17339870006830476368&seq_num=1&u_w=384&msid=com.croruptdesigns.gtav_themanual&cap=m%2Ca&js=afma-sdk-a-v6.4.1&bas_off=0&net=ed&app_name=1.android.com.croruptdesigns.gtav_themanual&hl=en&gnt=3&carrier=310260&u_audio=4&kw&u_sd=2&ms=CGmAthrKkyRp6xWcusoVxk_ntS2ZN59H63Qd8Jjg0ndLToWFNwJl32PSa2X8m09vF106i8Jsf_2BuJ6sG8m0duqbSvh8sZ7wgCPg5Rd7Tvxb63ZyO_lYyx7SMxpGtRjsleR2hmBLkYsdXrymwWPZDidE1qlU-Ahhjj8WjSrOPeHz7UpgEfKdxe35Xsk9iIqZoGkqf_QBAINQO63dItJW95a3d0jl9R9CLcmrNoZUTC4JSY6KVJIuvXYBBcRst9hy8sGl7Mkmt399rTsYelv_ZNU_NGTiz8OkaWBfVgvzeqhxSmgN5Eabfs_bdWsuQfB9W7sfVGqVAgnBHg2KPZ1mnw&format=320x50_mb&oar=0&u_h=592&bas_on=0&ptime=0&imbf=8008&u_so=p&output=html&region=mobile_app&u_tz=-240&client_sdk=1&ex=1&slotname=a1524e277372095&kw_type=broad&gsb=3g&caps=inlineVideo_interactiveVideo_mraid1_th_autoplay_mediation_sdkAdmobApiForAds_di&eisu=gkAjAmBMj3pCXLD39t1g2jfXkfrdgaKxkUlUxErHyL8lbW_DZ0Ax-0lWPhmyI4kVmCb2BcERmMkOa1W4aP02QZQuDw2BKjE_biobCXoJnC_R0BL3LCfhPy1JOkAAUEIy&et=58&jsv=56
10-06 12:15:30.034: I/Ads(1102): Request scenario: Online server request.
10-06 12:15:32.784: D/webviewglue(1102): nativeDestroy view: 0x2a1bf608
10-06 12:15:32.784: I/Ads(1102): onReceiveAd()
10-06 12:15:33.204: E/cutils-trace(1102): Error opening trace file: No such file or directory (2)
10-06 12:15:33.245: D/TilesManager(1102): Starting TG #0, 0x2a282a68
10-06 12:16:32.485: D/CordovaActivity(1102): Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml
10-06 12:16:32.565: D/CordovaWebView(1102): CordovaWebView is running on device made by: unknown
10-06 12:16:32.585: D/JsMessageQueue(1102): Set native->JS mode to 2
10-06 12:16:32.614: E/PluginManager(1102): =====================================================================================
10-06 12:16:32.614: E/PluginManager(1102): ERROR: config.xml is missing.  Add res/xml/plugins.xml to your project.
10-06 12:16:32.614: E/PluginManager(1102): https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/res/xml/plugins.xml
10-06 12:16:32.614: E/PluginManager(1102): =====================================================================================`

`import android.app.Activity;     import android.os.Bundle;     import android.webkit.WebSettings;     import android.webkit.WebView;

import org.apache.cordova.*;

import com.google.ads.AdSize;
import com.google.ads.AdView;

public class Manual extends DroidGap {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setIntegerProperty("loadUrlTimeoutValue", 60000);
        super.loadUrl("http://croruptdesigns.com/gta/index.html");

    }
} 

0 个答案:

没有答案