monkeyrunner scripting preparation work problem summary

1. What is an Android emulator, why to create it, and how to create it?

The role of the emulator is similar to the real machine, but it is actually different from the real machine. It is a file, stored in the android_sdk , and provides a platform similar to the real machine for scripts to run and test.

Created by AVD Manager.exe , but I don't have this file in my office computer, but my personal computer has it, which is strange.

The online solution is: re-upgrade and install the sdk .


2. CMD fails to open the emulator (as shown in the figure):

 

emulator: ERROR: unknown virtual device name: 'AVD_test'

emulator: could not find virtual device named 'AVD_test'

 ---- Reason 1 : The android_sdk_home environment is not configured (but in fact, after the configuration is successful , it is still invalid )

---- Reason 2 : You haven't created the AVD_test simulator

 

3. Several ways to write monkeyrunner scripts (run scripts ) :

( 1 ) cmd input directly

( 2 ) python script

4. Entering device=MonkeyRunner.waitForConnection() under monkeyrunner has no response and stays in the following interface:

 

 ---- Reason: The reason is hard to say, it may be related to the computer system or mobile phone. For example, the office computer of my company is not good, but the computer for personal use can.

Do you want to replace the computer?

5. How to load python scripts on eclipse

Reference: https://jingyan.baidu.com/article/9113f81b68ebce2b3214c7e0.html

Help menu -> Install New Software  -> add -> fill in:

NAMEpydev          LOCATIONhttp://pydev.org/updates

 

 At this time, eclipse will automatically download or load, after a while, continue to complete the following operations.

 

 

Click next to continue with the next installation.

 

 6. What is pydev ?

This is what the Internet says: A powerful Eclipse plug-in that allows users to fully utilize Eclipse for developing and debugging Python applications. The project that can use Eclipse as a Python IDE is PyDev .

Official instructions for pydev installation: http://www.pydev.org/manual_101_install.html

Detailed introduction: https://baike.baidu.com/item/PyDev/2560422?fr=aladdin

 7. How to load ADT Android development components on eclipse

Reference: https://jingyan.baidu.com/article/6766299783ac9854d51b84a5.html

https://jingyan.baidu.com/article/b0b63dbfa9e0a74a4830701e.html

 

Help menu -> Install New Software  -> add

NAMEEclipse-ADT

Locationhttp://dl-ssl.google.com/android/eclipse/

 

Sometimes you will encounter the official website URL and the installation fails, then first download the ADT file to the local, and then click Archive to import it.

 

7. Ways to write python scripts

write on eclipse

8. Why is there no AVD Manager.exe in the android_sdk file ?

Continue to upgrade or reinstall

9. Do you have to use the emulator that comes with android ?

Not necessarily, the built-in simulator is sometimes not very easy to use, you can use other third-party, such as the night god simulator https://www.yeshen.com/ and so on. 

10. Eclipse+PyDev configuration to build a Python development environment ?

Reference: https://jingyan.baidu.com/article/cd4c2979101f02756f6e6064.html

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325679885&siteId=291194637