1
私は簡単なwebviewを作成しようとしており、毎回FCを取得しています。ここでwebviewが動作しない基本アプリ - 起動時のFC
は私のMainActivity.javaファイルです:
package com.jerdog.apps;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView myWebView = (WebView) findViewById(R.layout.main);
myWebView.loadUrl("http://www.google.com");
}
}
とここに私のres/layout/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"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
私はに実行し、私は押した瞬間から、私のlogcatを含めていますペーストビンでEclipseの
これで、エミュレータで読み込むことができますが、タイトルバー以外は何も表示されません。チュートリアルのすべてをコピーしました – Jerdog
あなたの 'manifest'に' android.permission.INTERNET'を追加するステップ4を含めましたか? –
はい - mainActivity.javaファイル - http://pastebin.com/z2fabdA3およびmain.xmlファイル - http://pastebin.com/DdJ8ER4xおよびマニフェストファイル - http://pastebin.com/knNUcwQW – Jerdog