Posts tagged ‘android’

1.   Can’t connect to https://dl-ssl.google.com/android/repository/repository.xml

WorkArounds:

Add proxy in “Settings”

Select “Force https://… sources to be fetched using http://…” in “Misc” tab.

android sdk config

2.   Can’t install Update 7. Error prompt:

Folder failed to be renamed or moved on SDK install

Solution available on http://code.google.com/p/android/issues/detail?id=4410, which is a useful link to query the android open issues. Also abstract the useful one on my PC.

WorkArounds:

I had the same problem: the latest update failed to install because it couldn’t rename the tools folder in android-sdk-windows.  I’m using Avira antivirus and disabling it didn’t help, but I don’t think it had anything to do with the AV program anyway.

Fact is, running the Android SDK setup apparently uses items in the “android-sdk-windows\tools” directory.  I’m on Win 7 x64 so maybe that causes some unique situation – I’m not sure.

Solution:

– I made a copy of the tools folder itself (keeping it at the same directory tree level, thus “tools” and “tools-copy” were both in the “android-sdk-windows” folder).

– I ran Android.bat from that copy

– I ran the update without problems (it updated the original, not-being-used-at-the-moment tools folder, among whatever other items it needed to).

– I closed the SDK, deleted the folder (I had to kill the adb.exe process first – not sure why that always persists but you can’t delete the folder without doing that).

– I restarted the SDK from the normal (now-updated) tools folder.  Worked like a charm!

Note that simply killing adb.exe was NOT sufficient to get around the original issue… only by copying the tools folder and using the copy to run Android for the duration of the update process was enough to rectify the problem.

Tips for SDK configuration:

  1. Add the following environment path and restart:

ANDROID_SDK_HOME  E:\

This very helpful. First, save our C:\ space. SDK will save the created AVD and configurations to C:\Documents and Settings\<user>\.Android by default.  After add the environment path, these will be saved under E:\.Android . Second, reinstall system will not impact the SDK configuration.

TO BE ADD MORE.

Just collection and add some notes.

Abstract from http://androidappdocs.appspot.com/sdk/index.html

Eclipse IDE

  • Recommended versions: Eclipse 3.4 (Ganymede) or 3.5 (Galileo)

Caution: There are known issues with the ADT plugin running with Eclipse 3.6. Please stay on 3.5 until further notice.

  • Eclipse JDT plugin (included in most Eclipse IDE packages)
  • Several types of Eclipse packages are available for each platform. For developing Android applications, we recommend that you install one of these packages:
    • Eclipse IDE for Java EE Developers
    • Eclipse IDE for Java Developers
    • Eclipse for RCP/Plug-in Developers
    • Eclipse Classic (versions 3.5.1 and higher)
  • JDK 5 or JDK 6 (JRE alone is not sufficient)
  • Android Development Tools plugin (optional)
  • Not compatible with Gnu Compiler for Java (gcj)

My workspace: Eclipse 3.5.1 Galileo (include JDT plugin)+ JDK 1.5.0_15 + SDK (update to version 7)

Android的底层是基于C/C++的,但是做应用开发,需要使用java语言。而google官方推荐使用的开发工具是Eclipse。所以我们需要安装java开发必备的jre/jdk、android的库(SDK)、Eclipse以及Eclipse的插件(ADT)。

1、 一般,linux下已经安装了java,使用java -version看下版本,如果低于1.6的话,就需要重新安装了。

2、 下载SDK的管理包:sudo wget “http://dl.google.com/android/android-sdk_r06-linux_86.tgz”。注意,这里并不是直接把SDK安装了,解压之后,看到它“SDK\ Readme.txt”,需要执行“tools/android update sdk”,才会真正安装SDK。这里,需要有桌面系统,所以远程登录的同志们注意了。最好也使用root权限安装。

3、 下载Eclipse,从官网即可,需要对应的版本(linux、32/64位机)。解压即可。如果启动的时候出现问题,请查看/etc/sysconfig/selinux,关闭selinux的支持:

#SELINUX=enforcing
SELINUX=disabled

4、 安装Eclipse的插件ADT。可以通过Eclipse->help->install new software,使用ADT链接安装,也可以下载了ADT之后,解压,把plugins、features里的内容copy到Eclipse路径下的plugins、features下,并且删除eclipse/configuration/org.eclipse.update,重启Eclipse即可。