Write it down so you can see yourself in the future

There has been no IOS and Android developers in the company. Yesterday, when I had breakfast in the company, I accidentally received the demand for App development. Considering that there are a lot of technologies on the Internet that can make the front end play apps, among which React Native and Hybrid apps are quite good. But personally, React Native, 2333 comes from a Virgo who hates it for no reason. Thanks to my mother, feel “nuggets of original Writers” to give advice.

1. Work with android
  • Install Node and NPM first.
  • Installing cordova globally:

       $ npm install -g cordova
  • Install android SDK :(this article does not provide download address, note that android SDK file name can not have special characters)

    After the installation is complete, open SDK Manager.exe in the installation directory and click Tools >> Options

    The Settings are shown below:





    01


    Then add the following image to the system environment variable:





02

The variable value is the installation directory of your SDK

2. Create projects
  • Creating a Hello project

       $ cordova create hello
  • Into the project

       $ cd hello
  • Add android project

       $ cordova platform add android --save
  • Check whether the environment is configured

       $ cordova requirements




03

Note two points: First, configure the SDK Manager proxy server as shown in Figure 01. Second install Java JDK no less than version 1.8 and add system variables as shown below:





04

3. Build preview projects
  • If you configure it correctly, then build Android APK:

       $ cordova build android

    The first build will take a long, long, long time….
  • Android emulator preview, this emulator sucks, but it’s good to play with, SO I recommend using the Nighthian emulator

       $ cordova emulate android

    Now let’s go back to the directory that generated the file, as shown below




05

If you’ve ever played PHP, you know the folder where the WWW is used to put front-end code. I directly copied a project from the company’s mobile terminal into the folder. All network requests in the WWW folder must be absolute addresses, and then ran: Echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo echo





06

And you’re done!

Since you have made a choice, why to ask why to choose. – WeiZhuang