2011-02-08 40 views
1

,如果我在Honycomb預覽SDK運行下面我碰上信號11的WebView在Honycomb越來越信號11

package com.android.samples; 

import android.app.Activity; 
import android.os.Bundle; 
import android.view.Window; 
import android.webkit.WebChromeClient; 
import android.webkit.WebView; 

public class MyWebView extends Activity { 
WebView mWebView;   
/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState)  {  
    super.onCreate(savedInstanceState);    
    // Adds Progrss bar Support  
    this.getWindow().requestFeature(Window.FEATURE_PROGRESS);  
    setContentView(R.layout.main);    
    // Makes Progress bar Visible  
    getWindow().setFeatureInt(Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON);   
    // Get Web view   
    mWebView = (WebView) findViewById(R.id.MyWebview); 
    //This is the id you gave             
    //to the WebView in the main.xml   
    mWebView.getSettings().setJavaScriptEnabled(true);   
    //mWebView.getSettings().setSupportZoom(true);  
    //Zoom Control on web (You don't need this             
    //if ROM supports Multi-Touch    
    mWebView.getSettings().setBuiltInZoomControls(true); //Enable Multitouch if supported by ROM     
    //Load URL   
    mWebView.loadUrl("http://www.google.com"); 
    // Sets the Chrome Client, and defines the onProgressChanged   
    // This makes the Progress bar be updated.   
    final Activity MyActivity = this;   
    mWebView.setWebChromeClient(new WebChromeClient() {   
     public void onProgressChanged(WebView view, int progress)   {   
      //Make the bar disappear after URL is loaded, and changes string to Loading...   
      MyActivity.setTitle("Loading...");   
      MyActivity.setProgress(progress * 100); 
      //Make the bar disappear after URL is loaded    
      // Return the app name after finish loading    
      if(progress == 100)     
       MyActivity.setTitle(R.string.app_name);   
      }   
     });        
} 
//End of Method onCreate 
} 

,這是我的main.xml佈局

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
      android:orientation="vertical"  
      android:layout_width="fill_parent"  
      android:layout_height="fill_parent" >  
<WebView android:id="@+id/MyWebview"  
      android:layout_width="fill_parent"  
      android:layout_height="fill_parent" /> 
</LinearLayout> 

如果我切換到2.2說或2.3模擬器這是運行良好,但運行在3.0模擬器給出這樣的logcat

02-07 20:53:11.740: INFO/DEBUG(1399): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
02-07 20:53:11.740: INFO/DEBUG(1399): Build fingerprint: 'generic/sdk/generic:Honeycomb/HPI20B/eng.xav.20110125.162619:eng/test-keys' 
02-07 20:53:11.768: INFO/DEBUG(1399): pid: 1429, tid: 1451 >>> com.android.samples <<< 
02-07 20:53:11.768: INFO/DEBUG(1399): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr caccecb8 
02-07 20:53:11.768: INFO/DEBUG(1399): r0 caa137c0 r1 000000c4 r2 00000008 r3 002bb4f8 

到目前爲止,無法fin d什麼如何解決這個問題。 任何想法,我應該做些什麼來讓這項工作?

回答

0

現在看來,這是一個已知的問題

您可以閱讀this

+0

不是在尋找這樣:-(答案,但是的,你是對的。這正是我。看起來我-NEW- 3.0應用程序我現在卡住了,因爲目前還沒有解決方案:-(無論如何,感謝您的迴應。 – RvE 2011-02-08 17:29:33