Android Talker(1)MAC Environment
Android Talker(1)MAC Environment
- 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
- 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
- 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
- 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