0
私はEclipseのアンドロイドプラグインで全く新しいものではありませんが、私は最初からプロジェクトを書く際に新しいです。だから私はAndroid開発者のウェブサイトに行き、「Hello World」のチュートリアルに従いました。Androidプログラム起動失敗
私のプログラムを実行すると、エミュレータは残念なことに、 という画面を表示します。 私のコードは次のとおりです。
HelloAndroid.Java
package daniel.android.projects;
import android.app.Activity;
import android.os.Bundle;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Object o = null;
o.toString();
setContentView(R.layout.main);
}
}
Main.xml
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
のstrings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello, Android! I am a string resource!</string>
<string name="app_name">Hello, Android</string>
</resources>
たManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="daniel.android.projects"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".AndroidTesterActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
でなければなりません
を宣言 – kreeSeeker
エラーがスローされると、アプリケーションはロードされません。 – MByD
hh。チュートリアルはそれをそこに置くと言いました。 – kreeSeeker