System.out.println("Hello World!");
화면에 아무 것도 인쇄하지 않습니다. 그것은 콘솔에서 볼 수 있습니다. 나는 아래 코드를 시도하고 나를 위해 잘 작동합니다.
// 주요 활동 공용 클래스 MainActivity는 활동을 확장 {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.kuchbhi);
System.out.println("Hello World!");
}
레이아웃 /.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<EditText android:id="@+id/text_message"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="enter text" />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Send" />
</LinearLayout>
매니페스트 파일 ..
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name="MainActivity"
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>
이 코드를 시도하고 저를 보자 너 뭐가 뭔지 알아.
소스 코드를 시험해 보았는데 제대로 작동합니다. 화면 참조