[Newbie] IDEA build Android development environment

IDEA icon

Foreword

IDEA Introduction

IDEA is a well-known IDE. Its full name is IntelliJ IDEA. It is an integrated environment for Java language development. IntelliJ is recognized as one of the best java development tools in the industry, especially in intelligent code assistants, automatic code prompts, and refactoring. , J2EE support, various version tools (Git, svn, github, etc.), JUnit, CVS integration, code analysis, innovative GUI design and other functions can be said to be extraordinary.
IDEA is a product of JetBrains. This company is headquartered in Prague, the capital of the Czech Republic. The developers are mainly rigorous and well-known Eastern European programmers. Its flagship version also supports HTML, CSS, PHP, MySQL, Python, etc.

(So ​​in a sense, it is actually an all-round IDE, which is why I chose this IDE.)

The selection IDEA as the reason Android development IDE primarily Recently, I fell in love with my world, but I do not know how to use AS (Android Studio) to develop plug-ins, have been used for some time the Eclipse
, but because of the country's many restrictions to protect Measures, plus Eclipse is not very friendly to novices, I am sorry that I am too bad, plus I usually write Python and other types of code, so in the end I chose IDEA based on comprehensive considerations, in fact, I want to use VS Code! ! ! ! I love IDEA.

IDEA download

IDEA genuine is chargeable, of course, you can get a three-year free version by using the mailbox of an educational institution. If you do n’t want to use the education version, of course, there are many online ❤ share to find out. Because the copyright issue is not shared here. Of course, it is recommended that if you have the ability to still support the genuine.

1. Preparation

  • JetBrains IntelliJ IDEA

    Here I use the portable version found on the Internet for the 2019.2 version, integrated authorization patch, change the configuration file to the local directory bin \ Idea, can move the file configuration without loss, integrated plug-in software background image setting plug-in, integrated code browsing plug-in (CodeGlance) , Add a plug-in: GsonFormat, of course, you do n’t have to find such a complicated one, you can use it , because the success of the code has nothing to do with these bells and whistles .
    Of course, if you have the ability, try to find a localization. Although localization is not necessary, at least I haven't passed CET-6 and it is still difficult to get started.
  • Android development environment

    • JDK

      This is of course the foundation! ! ! The version I used is 1.8, so I encountered a lot of difficulties in the configuration, it can be described as a bitter tear, full of paper absurdity. Come hard.
      Of course, we still need to prepare the download address for everyone!

      Address: Click to download ...

      However, it is worth mentioning that since Java was past by Oracle, it seems that downloading now needs to register an account, and the speed is actually a bit slow. The IDM download I used took about half an hour to download. I do n’t know if Thunder will be faster. Conditional Thunder members are of course more funny.
      By the way, it is worth mentioning that you must configure the environment. This Baidu is basically there, so I wo n’t go into details.

    • The Android SDK is
      recommended to download from this website: click to enter
      and I found it from other people ’s tutorials, pull down the comparison below, or directly search for Tools in the browser Ctrl + F, and then remember to download the .exe under the Windows category The file with the suffix is ​​awful, because I won't use other files, and I'm afraid of mistaken children, so I just want to download this. SDK Tools download
      Then install it directly after downloading, remember to install the JDK before this step, because the installation process will detect whether there is a JDK, so install the JDK first.
      After the installation is complete, find your installation path, here I put it in the C: \ Android-SDK directory, you can see the SDK Manager.exe under the directory , double-click to open Ao.
      SDK Tools installation picture
      Of course, everyone also saw AVD Manager.exe , this is used to get a virtual machine, I cherish the hard disk resources, so I plan to measure the actual machine, if you are interested, you can take a look, it is not difficult.
      SDK Manager installation
      Find the API version you want to install here, remember, choose SDK Platform to download. Don't ask me why! Because I chose at the beginning, and then the hard drive lost dozens of G, the lesson of blood and tears. Then click Install there.
      Insert picture description here
      Choose Accept and Install here. I still have the problem of Lisence later. Of course, this is the latter. As will be mentioned later, you can install happily after clicking Install. Of course, you can choose more than one API version. This is based on which version of the APP you develop to choose, wonderful! Wonderful!
      Suddenly remembered! Please be sure to configure the environment variables of the Android SDK , otherwise I do n’t know how to deal with in IDEA, forgive my inability. This Baidu is pretty easy to do.

2. IDEA test Android environment

It's no secret, my JAVA has only recently started, but I am not literate, so I am still in the learning stage. Our teacher gave us a Android App project test environment, attach Gitee address here: points I opened
here I pulled down with Git, of course, you can page Http / Https Download specifically what I do not know anyway, you can download Web pages . Then drag it directly into IDEA to open it! ! !
However, before dragging into IDEA, you need to configure the Android settings of IDEA. As a Java IDE, you still need to configure it! ! !
IDEA startup interface
Click Configuration (Settings / Configuration)-> Project Defaults-> Structure (the default structure of the new project), this is probably the case, remember to read English, different versions may display differently.
JDK setting interface
Click the + sign pointed by the arrow, and then you will see several options such as JDK / Android SDK. Take the Android SDK as an example here. The JDK should follow the similar settings. Keep in mind your own JDK directory . The default directory can be seen in my picture.
Android SDK settings
Find your own Android SDK path, mine is the C: \ Android-SDK mentioned above, not selected here, everyone choose it yourself, and then confirm it, it will let you choose the API version number, choose according to your needs All right.
Android SDK version selection
Of course, all the APIs can be configured (it must be mentioned here that if you are using Android Studio, it will be automatically downloaded and configured), Mei Jue Jue ~
Final settings
It is worth mentioning that this step is very important, SDK selection For my own JDK version, the language level must be changed here . I have n’t changed it before, so Gradle has been unable to match our JDK, which is very annoying. I changed it to Default here, and it ’s just fine.
Finally, everyone opened the BASEMVP project that Gitee downloaded before, and after waiting for Build, it was almost close to the end. But I still feel at a loss when I want to come, so here are a few pictures.
Builde settings
First of all, we click Build on the top, do not know whether it is necessary (may be automatically executed?), But it is definitely a necessary step. As for the place selected by the box, it may not run at the beginning, and ADD CONFIGRATION is displayed. At this time, we will build first, and then wait for the build to complete. Generally speaking, this time is very long. Video, no traces of ads, => So you click here for the ball <= After the
Template configuration
Build is completed, you ca n’t run it. At this time, click Edit Configration , then follow the above figure, select the Android APP template , mouse select APP, directly Just make sure, and then you will find that the small arrow running there can be clicked. run
At this time, connect to the mobile phone / create your own virtual machine and you can run it.

3. Create a new APP

After completing the above steps, we can only say that our Android development environment is basically no problem, and the next step is to create a new project. Close our BASEMVP project and then create a new project or directly create a new project, this operation should be all right, put two screenshots to see (the above two ways).
Exit New
Directly build
Choose one of the two methods, because I am a stupid, so I try to be more detailed. Then we came to the creation interface.
Create new project
Generally speaking, there is no mistake here. Choose Android, and then choose your own project template. Empty or Basic can be used. The basics behind are the operations of Android Studio, so I wo n’t go into details here. In fact, I know Android myself. Very little .

So here is probably all the steps. If there is something wrong or wrong in the middle, please criticize and correct me.

Published 6 original articles · won 7 · views 262

Guess you like

Origin blog.csdn.net/qq_19577209/article/details/104566773