星期一, 8月 01, 2011

Android 程式開發專案版本升級 Upgrade or Downgrade!

Android 版本異動,真的可以說是日新月異,


若無良好的升級工具,無疑是對開發者另一種變相殘暴的虐待。

好在谷歌在這方面還挺得住,沒讓開發者吐血,不然動不動就升級進版,

每天就單單搬code,其他事就都可以不用做了。

Android 專案要升版(如:1.5 to 3.2)或降版  (如:3.2 to  1.5),都可以用這一招,

在Eclipse裡,

1.點選開發專案的名稱

2.按右鍵選擇"Property" 屬性

3.在 Property 視窗裡選擇Android, 這時即可選擇你想要異動為那一種的版本。

4.有一點靠不住的是,
在AndroidManifest.xml裡的  android:minSdkVersion 這個屬性要自己手動去改喔!!!
 如Android 2.2 => android:minSdkVersion="8"







==================================================
更詳細說明可以參考官方說明書:Managing Projects from Eclipse with ADT

Setting up a Library Project
A library project is a standard Android project, so you can create a new one in the same way as you would a new application project.

When you are creating the library project, you can select any application name, package, and set other fields as needed, as shown in figure 1.

Next, set the project's properties to indicate that it is a library project:

1.In the Package Explorer, right-click the library project and select Properties.
2.In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
3.Select the "is Library" checkbox and click Apply.
4.Click OK to close the Properties window.

The new project is now marked as a library project. You can begin moving source code and resources into it, as described in the sections below.

You can also convert an existing application project into a library. To do so, simply open the Properties for the project and select the "is Library" checkbox. Other application projects can now reference the existing project as a library project.


==================================================
PS>
以前HKT真的傻傻的搬過CODE從Android 0.8 to 0.9,1.5,1.6,
知道這招後,真的覺得當初真的笨到可以,哈哈哈~
(那時Develop Guide未提及半字><""")

相關文章:
Android 開發 教學目錄

0 意見 :

張貼留言

回覆意見時,麻煩輸入一下暱稱
(隨便取個名字也好~ ^_^)
好讓我方便回覆您的問題,
選擇「名稱/網址」輸入您的暱稱,
麻煩一下,謝謝大家。

關閉廣告 [X]