Android Development Record (RPM)

Source: Internet
Author: User

One, Android simulator related

1. Android Simulator Installation Market

Simulator is not installed by default market, see the network has more complex installation methods, there are 1 simple, try the simple, in the Android2.2 simulator under the test is OK, simple method is as follows:
1) Download 2 files: googleservicesframework.apk, vending.apk (I'm from here, thanks for sharing)

2) Install these 2 files sequentially (you need to run the emulator first):

A) switch to Android-sdk-windows\platform-tools first (the ADB tool has moved from tools down to platform-tools from revision 8)

b) adb install googleservicesframework.apk

c) adb install vending.apk

After the installation is successful, you see it in the simulator and there is already a market.

See:android Simulator installs Android market electronics

2. Android emulator install Adobe AIR runtime

The Adobe air on the Android emulator is different from the real machine, and the SDK has a for emulator runtime (specific locations such as: Adobe Flash Builder 4.5\sdks\4.5.0\runtimes\air\android\ EMULATOR\RUNTIME.APK), and then use the ADB Install command to load the emulator.

Note: The Adb-e install runtime.apk is required, otherwise the forced termination interface may occur if the air application is running.

3. command line install Adobe Air Development app to Android emulator times wrong: Failure [install_failed_invalid_apk]

Workaround:

The package parameters run in the emulator are slightly different: target needs to be specified as Apk-emulator, and the full Package command is as follows:

Adt-package -target apk-emulator -storetype pkcs12-keystore sign.p12 testapp.apk testapp-app.xml testapp.swf

Then use the ADB install, sure enough success.

4. Command line install APK app to Android emulator times wrong: [1] Segmentation fault PM Install/data ...

Cause: The APK file name is in Chinese.

Workaround: Change the APK file name to English.

5. Android Simulator is running slowly

Speed-up method:

1) Turn off the simulator to automatically detect the settings of the phone rotation, in the specific location: settings-Display-Turn off the "Automatically rotate the screen" option.

Reference: Android Simulator running slow solution

2) Increase the memory size of the Android emulator:

A) directly edit the C:/Documents and settings/ user name /.android/avd/ emulator name . Avd/config.ini, in Vm.heapsize=xxx After adding hw.ramsize=512 (unit MB, can be set according to the situation)

Reference: Increase the memory size of the Android emulator

b) can also be set through the SDK Manager, select the emulator to add memory, Edit ..... Hardware, New ... In the dialog box that appears, select device Ram size, and then go back to the previous interface and modify the value of the device RAM size directly.

Second, the Android SDK command line usage record

1. ADB

1) ADB devices list of devices currently connected to the PC (simulator or real machine)

2) adb install xxx.apk installs a program to the currently connected device for the first time

3) ADB install-r xxx.apk Update installs a program to the currently connected device

4) adb-d Install xxx.apk installs a program in debug mode to the currently connected device

5) adb-e Install xxx.apk installs a program in the for simulator mode to the currently connected device (emulator)

6) ADB shell PM List Packages lists the package names of all installed programs for the current device

7) adb-e Logcat View Log

8) adb-d Logcat View Log

9) adb logcat appid:v *:s View a log of an app

ADB logcat appid:v activitymanager:| *:s

One) adb logcat|grep "I.air" View only logs that contain "I.air"
adb logcat|grep "Hello" application name to view only a log of an app that contains "I.air"

adb logcat-c empty Logcat cache

2. Ddms

1) Ddms Open Dalvik Debug Monitor console

Third, AIR for Android

1. Debug air for Android mobile app via USB direct connection to HTC Desire HD

1) HTC Desire HD needs to meet the following points:

A) Settings→application→unknown sources is selected

b) Settings→application→development→usb Debugging is selected

c) USB connection to PC when selected: Charge only

2) PC must meet the following points:

A) ready to install the HTC Desire HD driver:

USB connection HTC Desire HD to PC, if the New Hardware wizard does not appear, you can open Device Manager to discover other devices that are known as ADB, view the properties of the device, record its hardware ID (useful), and then install the driver for the device, which you need before installing the driver B The operation described in.

b) Edit%adobe Flash Builder 4.5 home%\utilities\drivers\android\android_winusb.inf

Add the following 3 lines under [google.ntx86] or [GOOGLE.NTAMD64]:

TXT code

    1. ;
    2. ; HTC Desire HD
    3. %compositeadbinterface% = Usb_install, usb\vid_0bb4&pid_0ca2&mi_01

Note: After the usb\ is the hardware ID, needs to be modified according to the actual situation, can be obtained through the properties of the unknown Device->ADB Device Manager (above a))

c) Install HTC Desire HD driver: Select Browse driver file, navigate to%adobe Flash Builder 4.5 home%\utilities\drivers\android, ignore warning, confirm installation, after successful installation, you can Device Manager sees a new device called Android Phone.

3) Select on Device, debug via USB when debugging.

For more information on debugging Air mobile applications on your phone, see: http://help.adobe.com/zh_CN/flex/mobileapps/WSe4e4b720da9dedb5-2d82208b12e46a72ded-8000.htm

Android Development Record (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.