1.安装Pydev
"help" -> "Install New Software"
配置python路径
2.新建一个Pydev Project
3.将SL4A的android.py(在手机的/mnt/sdcard/com.googlecode.pythonforandroid/extras/python目录中)放到新建的工程中
4.创建一个加载脚本Launch_app.py
#!/usr/bin/env python
import subprocess
ADB = r'd:\Android\android-sdk\platform-tools\adb.exe'
APPLICATION = 'hello.py'
TARGET = '/sdcard/sl4a/scripts/'
def main():
# Upload the application.
subprocess.call([ADB, '-e', 'push', APPLICATION, TARGET + APPLICATION])
# Launch the application.
subprocess.call('"%s" -e shell am start \
-a com.googlecode.android_scripting.action.LAUNCH_BACKGROUND