Android Studio: Getting started on creating your own apps

Android Studio

Android has become the most widely used operating system in the world. It already has almost 4.000 billion users worldwide, which is a real sensation. In addition, the mobile operating system developed by Google and based on the Linux kernel has also attracted a huge number of developers. If you want to be one of them, here We introduce you to Android Studio.

With this work suite for developers you will be able to create your first apps compatible with the system and test its operation, whether it is a video game, a utility, or even a client app for your IoT projects, etc. The positive thing is that Android Studio is also available for Linux, so you can work from your distro without any problem.

What is Android Studio?

Android Studio logo

Android Studio is the integrated development environment (IDE) official tool for creating applications for Android devices. It is an essential tool for any developer who wants to create apps for smartphones, tablets, wearables and other devices that use the Android operating system.

Based on IntelliJ IDEA, Android Studio offers a complete set of tools that facilitate the application development process, from creating the user interface to compiling and deploying the app to a physical device or emulator. Among its Principal functions are:

  • Smart code editor: with auto-completion, refactoring, and static code analysis to improve productivity.
  • Support for multiple programming languages: In addition to Java and Kotlin, you can use C++ to develop specific parts of your app.
  • Visual designer: to create user interfaces (GUI) quickly and easily.
  • Android emulator: to test your apps on different virtual devices among the most popular ones and with different versions of Android to test compatibility.
  • Gradle Integration: A flexible build system for managing dependencies and setting build options.
  • Wide range of templates and samples: especially interesting for beginners or those who want to create an app quickly with this help.
  • Integration with Google Play Console: to manage the publication and distribution of your apps.

What can you do with Android Studio?

Now that you know what it is, and what functions it brings to developers, you should also know What you can do with Android Studio, or what you can use it for, well, here is a list of possibilities:

  • Creating user interfaces: allows you to design the GUI of an app in a simple and visual way, or also using XML code. You can customize the appearance with a multitude of themes and styles, scale them to adapt to different screen sizes, etc.
  • Writing efficient code: allows you to use the Java and Kotlin programming languages ​​to develop the logic of your app, that is, create a utility to perform a task X or a video game. Thanks to its tools, it will allow you to easily take advantage of the libraries available for Android, as well as giving access to the management of hardware resources, such as network access, storage, interaction with sensors, touch screen, etc.
  • Debugging and testing your application: Thanks to the integrated debugger, you can identify and correct errors in your code, thus avoiding possible bugs or vulnerabilities that affect your future app before launching it on Google Play or independently on the official store. On the other hand, emulators for different devices, configurations, and versions allow you to test your app in a variety of scenarios.
  • Optimize performance: Other features include identifying potential issues that slow down the app and improving areas that affect performance. Not only that, you have profiling tools at your disposal to reduce memory usage and battery consumption.
  • Get your app: Once you complete the process, it allows you to create an APK package to distribute and install your app, as well as allowing you to manage the different versions and updates that you may release in the future. And, of course, it also allows you to publish your app directly on Google Play so that it is available to everyone.

How to install Android Studio on Linux

Installation on MacOS, ChromeOS and Windows is simple, so I'm going to focus on the installation on Linux, which is perhaps the one that generates the most doubts. But before starting with the steps, you should know what they are. hardware requirements recommended to be able to install this IDE:

  • CPU: x86-64 AMD or Intel supporting Intel VT and AMD-V virtualization technologies, as well as SSSE3 extensions.
  • RAM: A minimum of 8 GB, but 16 GB or more is recommended.
  • Storage: You must have free HDD/SSD space of at least 8GB or more.
  • Screen: supports resolutions of at least 1280×800 px or 1920×1080 px.
*Note: You may find Android Studio in your distribution's repositories, or in your distro's app store, but it may not be the latest version available. Therefore, I recommend following the steps I describe here.

If you don't have certain libraries installed, you may also need to install some of the 32-bit libraries, For example:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686

If you meet these requirements, you should know that Android Studio is compatible with many 64-bit GNU/Linux distros, and works well on both KDE Plasma and GNOME. Now, the Steps to install Android Studio are:

  1. Access the official website of android studio downloads.
  2. Press the download button to start the download.
  3. After that, you should have a .tar.gz file in the location where you downloaded it.
  4. Copy that file into /usr/local/ if you're the only one using it, or into /opt/ if you want it to be available to multiple users on the system.
  5. Once copied there, you can unpack the contents of the tarball.
  6. Now, from the terminal, go to the directory where you extracted it.
  7. From there, go to android-studio/bin/.
  8. Then run the script inside it for the installation with the command «sudo ./studio.sh» without quotes.
  9. Then it's a matter of following the Setup Wizard installation and downloading components, which will also install the Android SDK, among others.

And that's it, you should now have the icon available among your apps so you can double-click on it and run it…

First steps to create your app

first app

Now that you have Android Studio installed on your system, the next thing will be set it up and take the first steps as I show you here:

  1. Run Android Studio.
  2. On the welcome screen select Settings.
  3. Within the configuration menu click on Default Project.
  4. And within this new screen, choose Project Structure.
  5. Once there, you need to choose SDKs in the left panel and click on +.
  6. This will allow you to select the configuration you want in your case, such as JDK (Java SDK) for Java and the Android platform or version you want to develop your app for. This will use these default settings for your future projects, but you can change them at any time.
  7. Once this is done, go back to the Android Studio welcome screen, and click on New Project.
  8. This will start a New Project Wizard.
  9. It will ask you to fill out a series of information about your app, such as the name it will have, the name it will have in Google Play, package name, ID, project location (directory where you want it to be), SDK, etc. This will depend on each case. Once finished, click Next.
  10. On the next screen of the wizard you will need to customize the icon that your app will have. When you finish, click Next.
  11. For example, you can now select an Activity directory of your choice, such as Blank Activity, which will produce a simple example “Hello World” app. Click Next.
  12. Once you've filled out the configuration parameters for your first project, you can click Finish. Android will then build your project structure. Note that it will take longer the first time because it has to download Gradle (it only does this the first time).
  13. The project will then open and you can see what it looks like. Basically you have a navigation menu on the left (don't be scared by the overwhelming amount of files, you won't have to edit all of them, just the ones marked in red), the Java source code in the middle, and on the right a screen of the Android device showing the result.
  14. At this point, you can start adding or modifying the source code and add whatever you need for the GUI, use the different tools it offers, try running it to see if it works on emulators, create the .apk, etc.

add plugins

By the way, Android Studio also allows add plugins that can extend your capabilities or make your work easier. From some that allow you to customize the look and feel of the editor, to others that allow you to navigate your code more easily, add ADB commands, learn keyboard shortcuts, automatically generate Java classes from JSON, etc. If you want to explore and use these plugins from the official JetBrains Marketplace repository, follow these steps:

  1. Open Android Studio.
  2. Go to File > Settings > Plugins.
  3. Click the Browse Repositories button.
  4. Find the plugin you want to install.
  5. Click Install.

I hope you found this helpful and that you start creating great Android apps. We will also be publishing articles on how to code in the future, so stay tuned to the blog…


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.