操作系统 Windows7 32bits
Eclipse 3.7.0(Indigo)
今天开始学习Android开发,学习过程中将通过博客记录遇到的问题及其解决之道。
安装ADT时遭遇“requires 'org.eclipse.wst.sse.core 0.0.0'”问题
试了很多办法,但都没有成功,这里就直奔主题,经验证,下面的解决方法应该是正确的解决之道。
错误描述:
Cannot complete the install because one or more required items could not be found.
Software being installed: Android Development Tools 18.0.0.v201203301601-306762 (com.android.ide.eclipse.adt.feature.group 18.0.0.v201203301601-306762)
Missing requirement: Android Development Tools 18.0.0.v201203301601-306762 (com.android.ide.eclipse.adt.feature.group 18.0.0.v201203301601-306762) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found
解决方法:
- 选择 Help->Install New Software
- 点击链接:Available Software Sites
- 检查是否有一个更新链接Indigo.如果没有,点击 Add 然后输入链接:http://download.eclipse.org/releases/indigo 这个链接也可能已经存在,我们需要将其设置为Enable(我的就是这种情况)
- 回到插件安装的初始界面,确保最下方复选框"Contact all update site during install to find required software",next继续。OK!!
如果是Eclipse 3.6(helios) 则对应更新链接为:http://download.eclipse.org/releases/helios
“Duplicate Location”问题
还出现一个问题提示“Duplicate Location”,这里顺便提一下。
这个问题出现的原因是我们现在制定的路径已经存在了,解决办法很简单:
window->preferences install->Update->avaliable software site删除重复的项目即可。
向sdcard中push文件时出现下面两个问题:
Failed to push the item(s).
进行如下设置即可解决:
eclipse->windwos->;Preferences->android->DDMS->ADB connection time out (ms)
将值改大一点即可。
Failed to push selection: Invalid argument
文件名中不能有空格;
最好也不要有中文,我push带有中文的文件时也遇到这个问题,看来对中文的支持不怎么好了。
Java.NullPointerException
测试某个Activity时总是提示空指针异常,该Activity加载的页面中有两个按钮,一个EditText。
当我将按钮处理时间注释掉时,没有异常。这让我百思不得其解,然后将按钮处理事件中的所有代码都注释掉,
还是提示异常。
最后发现问题出在Button的加载上,id写错了,写的id不是当前加载页面中的Button的id,
而是工程中另外一个页面中的Button的id,这样可以加载过来,但是添加事件时便报错了。
。。。。。。。。。