Created
October 10, 2015 10:41
-
-
Save a2tm7a/2e10f11e2512996438d3 to your computer and use it in GitHub Desktop.
Instllation Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#**Why Develop For Android?**# | |
With over **1 billion** Android devices already activated, Android represents an incredible opportunity for developers. | |
Android Studio is a latest and most widely accepted IDE designed by Google itself. If you want to develop apps in android then it is highly recommended to use Android Studio. | |
---------- | |
###**Quick Start**### | |
A typical native android application is written using XML for the frontend (the User Interface) and JAVA for the backend. | |
---------- | |
###**JAVA**### | |
All the programming part in android development is done using JAVA. Although it’s a great advantage, if you know a thing or two about programming in Java, but even if you know any object oriented programming language, then it will not be much difficult to relate to the concepts used during development. In short if you know C++ or C then also you are at peace. | |
---------- | |
###**XML**### | |
This is used to build the app’s user interface. All user interface elements in an Android app are built using View and ViewGroup objects. It has drag and drop User Interface | |
---------- | |
###**Running the app** | |
An android application can run either on your device or in the emulator that comes bundled with the SDK. Since the emulators can be slow, it is always recommended to use an actual device. [This link](http://developer.android.com/intl/zh-cn/training/basics/firstapp/running-app.html) contains detailed explanation for setting up your device/emulator for testing. | |
---------- | |
#**Installation of Android Studio** | |
First of all you require JAVA and for that you need to install JDK and JRE. | |
###**For windows:** | |
Follow [the link](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and click Java Platform (JDK) 8u60 photograph. It redirects to a new page on which select Accept license and download the version which is best suited with your machine. | |
After installing the JDK, you need to set the environment variable JAVA_HOME path and for that : | |
- For this, right-click on the 'This PC' icon on your desktop and select 'Properties'. On the next screen that appears, go to 'Advanced system settings' item. On the 'System Properties' window that appears, select the 'Environment Variables' button. | |
![System Properties](https://github.com/amitdelhi1995/StoreHouse/blob/master/system_properties.png?raw=true) | |
- The 'Environment Variables' window will appear (see figure below). Click on the 'New...' button. | |
![Environment Variables](https://github.com/amitdelhi1995/StoreHouse/blob/master/environment_variables.png?raw=true) | |
- The 'New System Variable' window will appear (see figure in right). Enter 'JAVA_HOME' as the variable name and 'C:\Program Files\Java\jdk1.8.0_25' as the variable value. Then click the 'OK' button. | |
![New System Variable](https://github.com/amitdelhi1995/StoreHouse/blob/master/new_system_variable.png?raw=true) | |
- Scroll down the 'System variables' window until you see the 'Path' item, then click on it. Then click on the 'Edit...' button. The 'Edit System Variable' window will appear. | |
![Edit System Variable](https://github.com/amitdelhi1995/StoreHouse/blob/master/edit_system_variable.png?raw=true) | |
- Click anywhere in the 'Variable value' field and then press the End key on your PC. Then type the following into the field: | |
;C:\Program Files\Java\jdk1.8.0_25\bin\ | |
*Do not forget the semi-colon at the start - they are used to separate each path item from one another. The completed screen will look something like this: | |
![Edit system variable 2](https://github.com/amitdelhi1995/StoreHouse/blob/master/edit_system_variable2.png?raw=true) | |
- For reference one can visit [this link](http://ridz1ba.blogspot.in/2015/01/how-to-install-oracle-java-and-andoid.html) | |
**Now comes the main part Installing Android Studio:** | |
• Go to http://developer.android.com/sdk/index.html select “Download Android Studio for Windows” | |
• Check the “ I have read and agree with the above terms and conditions” box and Download Android Studio For Windows | |
• Install studio after downloading. | |
• Click on Start a new Android Studio Project | |
• Click on the SDK Manager icon (containing android and a downward sign). | |
![SDK Manager](https://github.com/amitdelhi1995/StoreHouse/blob/master/sdk_manager.png?raw=true) | |
Install the following packages | |
![Default Settings](https://github.com/amitdelhi1995/StoreHouse/blob/master/android_sdk.png?raw=true) | |
![Tools](https://github.com/amitdelhi1995/StoreHouse/blob/master/android_sdk_tools.png?raw=true) | |
###**For Linux Users :** | |
**Installing JDK ad JRE** | |
• sudo apt-get update | |
• sudo apt-get install default-jre | |
• sudo apt-get install default-jdk | |
• sudo apt-get install oracle-java8-installer | |
**Installed JDK and JDE now you need to set the JAVA_HOME and for that :** | |
• sudo update-alternatives --config java | |
• sudo vim /etc/environment – add JAVA_HOME="YOUR_PATH" {Your path is the path returned in previous command} | |
• source /etc/environment | |
For reference one can [visit this link.](https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get) | |
**Now comes the main part Installing Android Studio:** | |
- https://developer.android.com/intl/zh-cn/sdk/index.html#Other select All Android Studio Packages - > Linux. This will start the download. | |
- Extract the file. In terminal type : | |
cd /{Location where you extracted}/android-studio/bin | |
sh studio.sh | |
- Then it will ask for downloading the SDK Tools. Next -> Next -> ... Finish | |
Click on Start a new Android Studio Project | |
- Click on the SDK Manager icon (containing android and a downward sign). | |
![SDK Manager](https://github.com/amitdelhi1995/StoreHouse/blob/master/sdk_manager.png?raw=true) | |
Install the following packages | |
![Default Settings](https://github.com/amitdelhi1995/StoreHouse/blob/master/android_sdk.png?raw=true) | |
![Tools](https://github.com/amitdelhi1995/StoreHouse/blob/master/android_sdk_tools.png?raw=true) | |
###**Some Common errors :** | |
- unable to access android sdk add-on list : | |
http://stackoverflow.com/questions/29878370/android-studio-first-run-error | |
1. Turn off the firewall. | |
2. Run Studio again. | |
3. Add android files to trusted files in your windows firewall and restart firewall. | |
- Your Android SDK is missing, out of date, or is missing templates. You can configure your SDK via Configure | Project Defaults | Project Structure | SDKs : http://stackoverflow.com/questions/26796724/your-android-sdk-is-missing-out-of-date-or-is-missing-templates | |
- Unable to locate adb within SDK : http://stackoverflow.com/questions/14421171/adb-error-on-android-sdk-using-linux-ubuntu-64-bit-12-10, http://stackoverflow.com/questions/27301960/unable-to-locate-adb-within-sdk | |
###**Some links** | |
https://www.youtube.com/watch?t=1&v=zEsDwzjPJ5c | |
** Some basic links to grasp a bit of more knowledge : | |
http://stackoverflow.com/questions/1906445/what-is-the-difference-between-jdk-and-jre | |
http://stackoverflow.com/questions/5102022/what-does-the-java-home-environment-variable-do | |
###**Resources** | |
There are many resources online that can help you getting started. Here we are listing a few that will provide you an introduction to this exciting world : | |
####**Video Tutorials** | |
• [Developing Android Apps](https://www.udacity.com/course/developing-android-apps--ud853) - Created by Google and offered on Udacity, this course is a nice stepping stone if you have prior programming experience. | |
• [UX Design For Mobile](https://www.udacity.com/course/ux-design-for-mobile-developers--ud849) - Another one by Google, this course will help you understand the most important and immediately useful techniques and approaches used by great mobile UX designers | |
• [Android Developers Youtube Channel](https://www.youtube.com/user/androiddevelopers/featured) - Videos containing demos, tutorials, and anything else related to Android development. | |
####**Documentation** | |
• [Official Android Developer Documentation](http://developer.android.com/intl/zh-cn/training/index.html) - Highly recommended and something every android developer must refer to, weather a noob or a pro. Contains beginner level tutorials as well as referance of all classes for more advanced developers. | |
####**Blogs** | |
• [Vogella Android Tutorials](http://www.vogella.com/tutorials/android.html) - Short and precise tutorials about development for Android: tools installation, debugging and using various features. | |
• [Android Hive](http://www.androidhive.info/) - Nice collection of tutorials, tips and hacks for android and game developers. | |
####**Question Answer Forum** | |
• [Stack Overflow](http://stackoverflow.com/) - Q/A forum for programmers. Most probably you will find the answer to your problem here. If not | |
• [There is always Google!](https://www.google.co.in/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment