Android Talker(1)MAC Environment
1. Install the android sdk
Visit here http://developer.android.com/sdk/index.html and install the android sdk for mac.

Unzip the file named android-sdk_r20.0.3-macosx.zip.

cp the unzip directory to /Users/username/tool/android-sdk-macosx

link the /opt directory there.

>sudo ln -s /Users/username/tool/android-sdk-macos /opt/android-sdk

>vi ~/.profile
export ANDROID_HOME=/opt/android-sdk
add 2 path to PATH configuration in this file
>vi ~/.profile
export PATH=/opt/android-sdk/platform-tools:/opt/android-sdk/tools:$PATH
>. ~/.profile

2. Install the eclipse plugin
Find the plugin here: https://dl-ssl.google.com/android/eclipse/
[Window]---->[References]------>[Android] find the right place that we put the android sdk
click on the [Window]------> [Android SDK Manager] click on [installed packages] and click [update all]

Install maven plugin
http://m2eclipse.sonatype.org/sites/m2e

Install maven android plugin
https://svn.codespot.com/a/eclipselabs.org/m2eclipse-android-integration/updates/m2eclipse-android-integration

3. Download the samples again
>git clone https://github.com/SpringSource/spring-android-samples.git

error message:
[INFO] Android emulator command: /opt/android-sdk/tools/emulator -avd 10
[INFO] Found 0 devices connected with the Android Debug Bridge

solution:
Use eclipse to start the android emulator first. Then it is ok now.

Some commands I may used.
check the device
>adb devices
List of devices attached
emulator-5554 device

start the virtual device manager
>android avd

start the android plugin manager
>android

deploy my project o emulator
>mvn android:deploy

start the virtual device
>mvn android:emulator-start

watch the log file
>adb logcat

4. Running the application from eclipse
error message:
Emulator] emulator: ERROR: Unable to load VM from snapshot. The snapshot has been saved for a different hardware configuration.

solution:
edit the AVD, uncheck the snapshot.

error message:
The function `CGSFlushWindow' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGSFlushWindowContentRegion' instead.

solution:
Just warning. Ignore them.
>mvn android:deploy
>mvn android:run

references:
http://sillycat.iteye.com/blog/1065583
http://sillycat.iteye.com/blog/1065584
http://sillycat.iteye.com/blog/855334
http://sillycat.iteye.com/blog/707399

http://developer.android.com/sdk/installing/index.html
http://developer.android.com/tools/help/adb.html
https://github.com/SpringSource/spring-android-samples/blob/master/README.md


更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android(安卓)Application Architecture
  2. layout_gravity和gravity的区别
  3. 折叠式标题栏实现
  4. Android(安卓)安全和权限
  5. android:ADT 22.0.1 发布
  6. android之控件EditText学习
  7. Android 触屏事件处理_手势识别
  8. 简单安卓QQ登录界面
  9. android SQLite数据库存储数据
  10. 怎样成为一名Android开发者