Android Android development - build a development environment

Install Android Studio (AS for short)

Mainstream installation version 3.X
Enterprise software development version is low or high Recommended 3.0
https://disk.baidu.com/s/1AB6f4HrtMqAmM-HITYqyVA fqad

install jdk

For the corresponding relationship between Android sdk and jdk, please see here:
[SDK and JDK versions corresponding to each version of Android]
It seems that jdk is not easy to download now:
https://disk.baidu.com/s/1TpZVLle-IMymadrKaaWD3A m63c

install gradle

After as is installed, he can automatically install many plug-ins and sdk online, but gradle is blocked and needs to be installed manually; https://disk.baidu.com/s/1PubRSLT_l2Bij5p_k665tg
nd9n installation
tutorial here:
[Manual installation method of gradle]

problems encountered

  1. Running in Debug mode, it prompts that
    error message 1
    the adb.exe process is blocked by anti-virus software, and the firewall software and anti-virus software need to be uninstalled

  2. After loading the generated project, it prompts
    Prompt after project loading
    to reinstall Android Studio and use the same version as the original project

  3. The error pop-up window prompting Application installation failed
    is as shown in the figure:
    error message 2
    Installation failed with message Failed to finalize session: INSTALL_FAILED_TEST_ONLY: installPackageLI.
    It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
    WARNING: Uninstalling will remove the application data!
    Do you want to uninstall the existing application?
    1. Try again after Clean Project, if it still doesn't work, uninstall the app on the emulator.
    2 Solutions:
    1. Open the menu File——Settings——Build, Execution, Deployment——Instant Run
    2. Uncheck Enable Instant Run to hot swap code/resource changes on deploy (default enabled)
    3. Click Apply—— OK, re-run the program, and you're done.

Will add to other problems in the future.

Guess you like

Origin blog.csdn.net/pujinhong0412/article/details/93768591