Hello everyone, yogurt and everyone long time no see! What to share with you today is: How to quickly write a app! with Android studio
First of all, yogurt to declare that this article is for beginners, very basic. So the master will not have to see, or I am in front of you swim. When you want to write an app, believe you must have the same confusion as the original yogurt. What software do you want to use to write? This software is difficult to operate high? Not much of a programming level? Then, the next Yogur will be one by one for you to answer it! ~~
The most common software to write the app of course is eclipse,android studio,appmaker and so on, here is not all listed, you go online search, come out a lot. But a more professional point should be the top two, regardless, anyway, yogurt only used the first two! In comparison, Eclipse is too professional, for the Java Foundation is very good, more professional, in the future to go farther on the programming of children's shoes is a very good choice, his operation is more difficult. For the Java Foundation a little bit, just want to contact learning programming to write the app, but a little bit professional not too low or too stupid child shoes, it is highly recommended to choose Android studio! And it has an interface simulation for adding controls, and your layout of each control on the interface is automatically generated. The statement in XML is very convenient! When yogurt and team members first wrote the app, the dictionary chose Eclipse, and the results were written halfway, and the operation was too difficult and the requirements for professionalism were too high. Especially for JDK and ADT version matching requirements, personally feel that only want to write an app written to play the person is too harsh!
When you choose a software to write, you have to go to the Internet to find his installation package. When downloading the installation package (it will be a long time), you can start to do one thing, that is to go to Baidu next you need to do things, because it is a heavy and long way! Yogur can only use a very unprofessional like you learn the same tone as students to tell you the process:
Since you are writing an Android app, you need to configure an Android development environment for your computer, and the process is to install the JDK! It is highly recommended that after you feel the installation is successful, be sure to verify in the command prompt cmd whether the Android environment has been built. When you have the JDK installed, your programming software is almost ready to download, and you can follow the online tutorial to install Android Studio for your own computer version in one step. After the installation is complete, you will need to install the SDK if you want to develop and debug the Android program in this software. This SDK mainly includes core library files, a simulator, development tools and sample files for demonstration! You can definitely use it in code! Speaking of this SDK is very annoying, because his version will affect the success of your app to run, so it is recommended to install the latest version, how new is new! After you download the SDK and unzip it, choose the location of the SDK in your programming software, which is equivalent to telling him where to find the SDK you want. Finally, you need to install a thing that is the ADT (Android development tools) Android development tool, which provides an upgrade or change of development tools for Android development, simply understood as an upgrade download tool for open tools under programming software.
To see how the app works on your phone, you'll also need an Android emulator, which typically comes with this feature (both Eclipse and Android studio), but requires you to "activate" it. Set him up as the model you want to install, so it's really like the interface on your phone. No need to download to the phone to install to see the app effect, an Android simulator can help you fix it, very convenient.
Simply put: JDK (Android Environment) + Programming Software + SDK (development kit, including those libraries and packages) + ADT (development tools, responsible for development tool upgrades and changes) + Set up Android simulator
When you're ready for this, you'd better write a Hello World app and actually download it to your phone to open it. Find out how the app is going from writing to debugging to publishing to downloading and installing. Then you can start writing your app in more depth.
When you write an app, the main thing that needs to come across the code is. Java and. XML are the two folders,. Java is responsible for the operation of the interface implementation, and. XML is responsible for the interface layout is what the interface looks like the layout. The images you need to use in your app are placed in the drawable/drawable-xdpi folder. The style, color, string strings, size dimens you want to use are all placed in the values folder.
PS: Many of the Android interface function implementation code can be found on the Internet, the use of other people have already written code, seriously learn how others are realized, learn from each other, it is learning programming a multiplier way! Wish you all become a Master of procedure!
How to quickly get started with Android Studio and use it to write apps