亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 1925 | 回復(fù): 2
打印 上一主題 下一主題

請(qǐng)教一個(gè)入門級(jí)別的問(wèn)題: [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2010-06-19 00:29 |只看該作者 |倒序?yàn)g覽
本帖最后由 kingink1983 于 2010-06-19 00:31 編輯

在參照android docs學(xué)習(xí)的過(guò)程,發(fā)現(xiàn)/tutorials/hello-world.html界面下的【Upgrade the UI to an XML Layout】節(jié)的例子在前面的基礎(chǔ)上無(wú)法編過(guò)
1 In the Eclipse Package Explorer, expand the /res/layout/ folder and open main.xml (once opened, you might need to click the "main.xml" tab at the bottom of the window to see the XML source). Replace the contents with the following XML:

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <TextView xmlns:android="http://schemas.android.com/apk/res/android"
  3.   android:id="@id+/textview"
  4.   android:layout_width="fill_parent"
  5.   android:layout_height="fill_parent"
  6.   android:text="@string/hello"/>
復(fù)制代碼


Save the file.
2.# Inside the res/values/ folder, open strings.xml. This is where you should save all default text strings for your user interface. If you're using Eclipse, then ADT will have started you with two strings, hello and app_name. Revise hello to something else. Perhaps "Hello, Android! I am a string resource!" The entire file should now look like this:

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <resources>
  3.     <string name="hello">Hello, Android! I am a string resource!</string>
  4.     <string name="app_name">Hello, Android</string>
  5. </resources>
復(fù)制代碼

3 Now open and modify your HelloAndroid class use the XML layout. Edit the file to look like this:

  1. package com.example.helloandroid;

  2. import android.app.Activity;
  3. import android.os.Bundle;

  4. public class HelloAndroid extends Activity {
  5.     /** Called when the activity is first created. */
  6.     @Override
  7.     public void onCreate(Bundle savedInstanceState) {
  8.         super.onCreate(savedInstanceState);
  9.         setContentView(R.layout.main);
  10.     }
  11. }
復(fù)制代碼


僅僅是更新里textview的調(diào)用方式,在工程中,src和res的文件夾中均顯示錯(cuò)誤,無(wú)法編譯,
教程中尚無(wú)特別的提示,還望大家給予指點(diǎn)。謝謝。

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2010-06-19 13:49 |只看該作者
好好看看錯(cuò)誤提示吧,我不做應(yīng)用。

論壇徽章:
59
2015七夕節(jié)徽章
日期:2015-08-24 11:17:25ChinaUnix專家徽章
日期:2015-07-20 09:19:30每周論壇發(fā)貼之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38榮譽(yù)版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年紀(jì)念徽章
日期:2015-07-20 11:05:27IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-07-20 11:05:34操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:36程序設(shè)計(jì)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:40數(shù)據(jù)庫(kù)技術(shù)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:432015年辭舊歲徽章
日期:2015-07-20 11:05:44
3 [報(bào)告]
發(fā)表于 2010-06-20 22:17 |只看該作者
這個(gè)例子好簡(jiǎn)單。根本沒(méi)有問(wèn)題。你自己新建一個(gè)Android應(yīng)用就是這樣的。看看是不是ADT插件沒(méi)有裝好。
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP