編輯:關於Android編程
首先,你可能不小心看到了這一篇……沒錯,對Android開發我完全首次接觸……所以遇到的問題都很簡單的……(大部分解決辦法摘選自stackoverflow)
一
忘截圖了,新建項目後,沒動任何代碼,卻各種保存。好吧,是因為SDK下載的不完全,比如默認的新建項目是Android 2.2的,然而我只下載了Android 4.0到6.0的……所以只用到Android SDK Manager上下載就好了,或者直接將默認的Minimum Required SDK設置成已經下載好的,比如我這裡是4.0。
二
新建項目時有如下報錯:
problem opening wizard the selected wizard could not be started
直接將Eclipse關掉,重新打開後也許就好了。如還沒好,就執行如下步驟:
If you have not added ADT then do the Following steps.
Help -> Add New Software -> Add.
In Name option write ADT
And if you have installed ADT in your Computer then add its path in Location like
jar:file:/D:/ADT-16.0.1.zip!/
And then ADT will install.
And if there is a problem try to remove that adt and install again.
1) remove the ADT repo (Window->Preferences->Install/Updates->Available Software Sites)
2) add Indigo repo (http://download.eclipse.org/releases/indigo)
3) run updates
4) add ADT repo again and install
三
快速生成文檔注釋:Alt+Shift+J
四
如下報錯:
OnClickListener cannot be resolved to a type
解決辦法:
Add this import:
import android.view.View.OnClickListener;
If you are using Eclipse, you can use Ctrl+Shift+O to make it import those clases or interfaces automagically.
五
如下報錯:
Plug-in com.android.ide.eclipse.adt was unable to load class android
解決方案:
If you have not added ADT then do the Following steps.
Help -> Add New Software -> Add.
In Name option write ADT
And if you have installed ADT in your Computer then add its path in Location like
jar:file:/D:/ADT-16.0.1.zip!/
And then ADT will install.
And if there is a problem try to remove that adt and install again.
1) remove the ADT repo (Window->Preferences->Install/Updates->Available Software Sites)
2) add Indigo repo (http://download.eclipse.org/releases/indigo)
3) run updates
4) add ADT repo again and install
本文實例為大家分享了Android計時器的三種方法,具體內容如下目錄:1、借助Timer實現2、調用handler.sendMessagedely(Message msg
信息的發送,對於Mms應用程序來講主要就是在信息數據庫中創建並維護一條信息記錄,真正的發送過程交由底層(Frameworks層)函數來處理。總體的來講,當信息創建完成後,
前面分析那麼多系統源碼了,也該暫停下來休息一下,趁昨晚閒著看見一個有意思的需求就操練一下分析源碼後的實例演練—-自定義控件。這個實例很適合新手入門自定義控件。先看下效果圖
什麼是反射?反射是一種能夠在程序運行時動態訪問、修改某個類中任意屬性(狀態)和方法(行為)的機制(包括private實例和方法),java反射機制提供了以下幾個功能:在運