I created the Hello World app and the system generated most of the Android language below. When you start the application without an operator System.out, "Hello" is not displayed in the emulator. Then, using the Eclipse tutorial, I read that I can add an operator System.out.printlnto main. The application starts again, but there is no way out.
System.out
System.out.println
What I don’t understand here?
<?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" System.out.println =" Hello world!" /> </LinearLayout>
I had the same problem, it turned out that I needed to be more patient.
AVD FOREVER... Eclipse, , , "ANDROID_" . , "Hello, Android" , , . (, .)
Android- Android, , , , AVD ... , ?
, , :) , . , , "Hello, Android", TextViews , XML . , , XML , TextView. , "System.out.println =" hello world! " , XML . , , System.out.... - Android - Log.d(" "," "), Android.
, , . , , . . , , , .
.
[your_layout].xml ... : layout_width = "fill_parent" : layout_height = "wrap_content" android: text = "Hello world" /" >
[your_layout].xml ... : layout_width = "fill_parent" : layout_height = "wrap_content" android: text = "@strings/hello" /" >
res/values /strings.xml
<resources> <string name="hello">Hello world</string> </resources>
. , , System.out.println Android, XML . "@string/hello" , "hello" strings.xml.
, Android.
, putlllll . ( ) . . , Activity (java ), .