首先,你可能不小心看到了这一篇……没错,对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
版权声明:本文为 NoMasp柯于旺 原创文章,如需转载请联系本人。