Convinced that Android development is for you? What you need then is a complete development environment so that you can jump in and get started. With that in mind, this post will go over the basic steps necessary to prepare your computer for Android development. By the end, you’ll be ready to start inputting code and testing your apps!
Downloading the files
Remember: in order for you to code in Java on your machine, you’re first going to need to download the Java Development Kit. You can find that here – what you’re looking for is the ‘Java SE Development Kit’. Simply make sure you pick the right version and the right installation file for your operating system and your processor (most likely x64).
You can likewise get Android Studio here. Again, get the latest version and remember that this is also going to include the Android SDK and various other tools you need to get started.
Installation
It doesn’t really matter what order you install these elements in, but it does make sense to go ahead with Java first seeing as nothing else will work without it. To get started, just double click on the JDK executable and then click ‘Next’ to go through the steps. Make a note of where the JDK is installed, as this may come in handy in future.
Installing Android Studio is just as simple. Once again, just run the setup file and then click ‘Next’ to progress through the stages. Make sure you tick the checkbox that indicates that you wish to install the Android SDK as well as Studio and once again, it can be a good idea to make a note of where everything is being installed in case you need it later. By default, your app might go into the AppData\Local which is a hidden folder and can cause confusion later on. If you change this to something easier to find though, note that your directory isn’t allowed to have any spaces in it.
This installation process might feel a little like a lengthy and fiddly process. But don’t worry: now that you’ve done this once, you’ll actually never need to do it again (at least until you swap computers). And when you compare this to what the set-up process for Android development used to be like… there’s really no comparison. Android Studio has come on leaps and bounds since the early days and that’s fantastic news because it makes the whole process much more accessible than it previously was.
Welcome to Android Studio: Starting your first project
And with that… you’re in! Load up Android Studio and it should all be working right out of the box. Again, there was a time that you had to tell Android Studio where the JDK and Android SDK were located but thankfully it now does that automatically.
So, all that’s left to do is to try out your first project!
1 Naming the app
To do that, just click the top menu and select File > New > New Project. You’’ now be asked to come up with a name for your application and you’ll be prompted to add a company domain as well. The ‘package name’ (the name of your app as the devices will see it) is then made up of both these names.
So, if you want to call your app ‘Ultimate Calculator’ and your business domain is ‘Apps Forever.com’, then you might end up with a package name like com.appsforever.ultimatecalculator. The only name that the user will see though, is ‘Ultimate Calculator’.
2 Targeting the right Android version
Next, you’ll be asked what kind of device you’re developing for. The ‘Minimum SDK’ is the lowest version of Android that you want to support. By default, at the time of writing, this is set to 4.0.3 IceCreamSandwich.
We’ll talk more about this later on. For now, know that the lower the Minimum SDK, the more users will be able to try and buy your apps. However, if you wish to use more modern features of Android, then you might be required to target newer versions of Android exclusively.
When you downloaded Android Studio and your version of the Android SDK, you will likely have installed the most recent and up-to-date version. Android SDKs are backward compatible, so you can support any version of Android that is lower, but you’ll need to update it if you want to support something newer in future.
For now, just leave this as it is and of course, you’ll want to tick ‘phone and tablet’. If you wanted to target watches or TV, then you would tick the respective boxes below.
3 Choosing an activity type
On the next screen, you can choose to add an activity. Apps are made up of activities which generally speaking are the screens that you move between while using your app. While you can add activities later on, chances are you’re going to begin your app with some kind of splash screen or UI to show to the user, so you may as well add an activity at this stage.
There are several options here though, which include ‘Basic Activity’, ‘Bottom Navigation Activity’, ‘Empty Activity’ etc.
Basic Activities are your default applications. These are the apps that have most of the general recommended UI elements in place such as the FAB. The FAB is the ‘Floating Action Button’ – a round button that lives in the bottom right corner of many apps on the Play Store (including nearly every app from Google). If you want to follow Google’s design language (Material Design) in future, then go ahead and choose Basic Activity. This does introduce more code for us to deal with though, so for now I recommend you stick with ‘Empty Activity’.
4 Naming your activity
Click ‘Next’ again and you’ll now be on a screen where you can name your activity and the accompanying ‘layout file’ which will handle the appearance of your app and the positions of the elements. Activity files are written in Java and so they have the extension ‘.java’ while layout files use XML and so have the ‘.xml’ extension. If you build a big app project, then you can eventually end up with lots of different activities, all with different names. This can get confusing and so it’s important to name them logically. If no activity in your app is considered the ‘main’ screen, then you might want to change this and name it something different.
Your layout file is going to go into your resources folder, along with images and sound effects that you create later on. A good thing to learn right now is that anything in this folder is required to use lower case only. That’s why the default name for your xml is activity_main.xml, while the default name for your Java file is ‘MainActivity.java’. MainActivity.java is getting around the lack of spaces by using something called ‘camel case’ where each new word starts with a capital. Because we can’t use capitals in resource files either, they need to use underscores to separate individual words.
But for now, you can leave these names as the defaults. Just hit ‘Next’. Do that and you’ll now be looking at your very first app – congrats!
In fact, Google has already populated this project with some code for you so it should already function as a full ‘Hello World’ app! Were you able to run it (which requires a little more set-up unfortunately!) then you would see ‘Hello World!’ displayed on your screen. For now though, if you double click on the activity_main.xml file and then choose the ‘Design’ view, you’ll be able to see what it would look like.
But there are actually a whole lot of different files that contribute to just that single ‘Hello World!’ and there are an awful lot of buttons and tools that are probably already starting to give you nightmares.
Don’t worry, it’s all quite simple once you know what you’re doing. In the next post, we’ll demystify Android Studio so you’re ready to start bending it to your will and building your own apps!
I have checked your website and i have found some duplicate
content, that’s why you don’t rank high in google’s search results,
but there is a tool that can help you to create
100% unique content, search for: Boorfe’s tips unlimited content
Thanks for every other excellent article. Where else may just anybody get that type of information in such an ideal approach of writing? I’ve a presentation subsequent week, and I’m on the search for such info.
Hello admin, i must say you have hi quality content
here. Keep up good work.
This is very interesting, You are a very skilled blogger.
I’ve joined your feed and look forward to seeking more of
your fantastic post. Also, I have shared your site in my social networks!
Thank you, for Sharing.
Hi, I do believe this is a great web site. I stumbledupon it 😉 I’m going to come back once again since I saved as a favorite it.
Money and freedom is the greatest way to change,
may you be rich and continue to guide other people.
Have you ever thought about creating an e-book or guest authoring on other blogs?
I have a blog based on the same subjects you discuss and would love to
have you share some stories/information. I know my readers
would enjoy your work. If you are even remotely interested, feel free to send me an e mail.
Wow, awesome blog structure! How lengthy have you been running a blog for?
you made running a blog look easy. The whole look of your
website is great, as well as the content material!
Thank you for your Review.
Good Luck,
Admin
Hi! I know this is sort of off-topic but I needed to ask.
Does running a well-established blog like yours require a lot of work?
I am brand new to running a blog but I do write
in my diary daily. I’d like to start a blog so I can easily share my own experience and views online.
Please let me know if you have any ideas or tips for brand new aspiring bloggers.
Appreciate it!
I visited several web sites except the audio quality
for audio songs existing at this web site is truly marvelous.
Very nice post. I just stumbled upon your blog and
wished to say that I have really enjoyed surfing around your blog posts.
After all I’ll be subscribing to your feed and I
hope you write again very soon!
Howdy! This is my first visit to your blog! We are a collection of
volunteers and starting a new project in a community in the
same niche. Your blog provided us beneficial information to work on. You
have done a marvellous job!
I have been browsing on-line more than three hours today,
yet I never discovered any attention-grabbing
article like yours. It’s pretty value enough for me. In my opinion, if all
web owners and bloggers made excellent content as you did, the internet will probably be a lot more helpful than ever before.
Thank You, I’m so glad to help you.
Definitely believe that which you stated. Your favorite reason seemed to
be on the web the simplest thing to be aware of. I say to you, I certainly get irked while people
consider worries that they plainly don’t know about.
You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people could take
a signal. Will probably be back to get more. Thanks
If you wish for to improve your know-how simply keep
visiting this site and be updated with the latest gossip posted here.
Wonderful blog! Do you have any tips for aspiring
writers? I’m hoping to start my own blog soon but I’m a
little lost on everything. Would you advise starting with a free platform like WordPress or go for
a paid option? There are so many choices out there that I’m
totally overwhelmed .. Any recommendations? Thanks a lot!
Hi I really enjoyed reading this blog
This post is interesting !!!