Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> 個人Android學習過程中問題及解決辦法匯總

個人Android學習過程中問題及解決辦法匯總

編輯:關於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

 

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved