Friday, 29 April 2016

Issue:- Android SDK Manager: peer not authenticated

When you are trying to update your Android SDK, you may have encountered this problem:-
Fetching https://dl-ssl.google.com/android/repository/repository-5.xml, as follows:-





This may be happening because you might be accesing internet from within proxy server.
You might be getting this error because you are accessing "https://" instead of "http://" which is not allowed by your server. So, this can also be a server side problem, but I am not sure about this.

After a quick ransack about this, the best solution to this problem which I found is as follows:-
In your SDK manager, Go to Tools Menu > Options... and in the pop-up dialog tick the "Force https://... sources to be fetched using http://..." option.


You are done...!!
Restart your SDK manager and download again your required packages.

Happy Coding..and remember, Code to make it better...




Saturday, 23 April 2016

Install Android studio


Hi, let's move forward to the next step now. With reference to my last blog where we downloaded android studio, now lets install it and start developing some interesting android applications.

After downloading the Android Studio, first thing which you have to do is verify which version of the JDK you have:-
Open your command line and type javac -version.


If the JDK is not available or the version is lower than 1.8, download the Java SE Development Kit 8.


To install Android Studio on Linux, proceed as follows:

  • Unpack the .zip file you downloaded to an appropriate location for your applications, such as within  "/usr/local/" for your user profile, or  /opt/  for shared users.
  • To launch Android Studio, open a terminal, navigate to the android-studio/bin/ directory, and execute studio.sh.
  • Select whether you want to import previous Android Studio settings or not, then click OK.
  • The Android Studio Setup Wizard guides you though the rest of the setup, which includes downloading Android SDK components that are required for development. Tip: Add android-studio/bin/ to your PATH environment variable so you can start Android Studio from any directory.

To install Android Studio on Windows, proceed as follows:
  • After downloading the package, launch the .exe file to your PC from the Android Studio home page.
  • Follow the instructions on the setup wizard to install Android Studio.
  • If asked to point to where Java is installed, you need to set an environment variable in order to direct the installer to the proper location. To do that, select Start menu > Computer > System Properties > Advanced System Properties. From there you’ll open the “Advanced” tab and click “Environment Variables.” Here you’ll add a new system variable titled JAVA_HOME that points to your JDK folder.
For example:-     " C:Program Files\Java\jdk1.7.0_21 "
The actual tools and other SDKs packages are stored outside of the directory that contains Android Studio.


To install Android Studio on Mac OS, proceed as follows:
  • Download the installer to your PC and launch the .dmg  file from the Android Studio home page.
  • Drag and drop the .dmg into your Applications folder.
  • Open Android Studio and follow the instructions from the setup wizard.
If you get a warning saying that the file is damaged and should be moved to the trash, go to System Preferences > Security & Privacy and under the “Allow applications downloaded from” section select “Anywhere.” From here you can repeat 3rd point above and install the program.

To access Android SDK tools from the command line (Finder > Applications > Utilities > Terminal):



That's it!!
As new tools and other APIs become available, Android Studio tells you with a pop-up, or you can check for updates by clicking Help > Check for Update.

Now since you have downloaded and installed Android Studio, start exploring it.
Will tell you more about android studio and its new features and some other interesting tricks to develop android applications, in my coming blogs.

And remember, Just code to make it better..!!



Saturday, 16 April 2016

Starting with Android Studio

Hi,

As this is my first blog, I would like to introduce myself to you all. I am Nishant Sharma, Android Developer, very fond of technology. I am always open to new things and technologies and always keen to learn something new, as result of which I have started writing the blogs. Thanks to the HeaderLabs team for making me learn this new thing. And i recommend you also to get-up and search for new things around you- this NEW can be anything..!!!!
This blog series will be regarding the so popular and common-Android. I'll thing about something else also to write but later..!! 

Now as for the starting point, I would like to start from the scratch. We will start from the Environment description which is required for starting with the development in of Android Applications.

Android Studio- 
Android Studio is the official IDE for Android app development, based on IntelliJ IDEA. On top of IntelliJ's powerful code editor and developer tools, Android Studio offers even more features that enhance your productivity when building Android apps, such as:

  • A flexible Gradle-based build system
  • Build variants and multiple APK file generation
  • Code templates to help you build common app features
  • A rich layout editor with support for drag and drop theme editing
  • Lint tools to catch performance, usability, version compatibility, and other problems
  • Code shrinking with ProGuard and resource shrinking with Gradle
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine

The minimum and recommended hardware requirements for Android Studio are:

Windows

  • Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)
  • 2 GB RAM minimum, 4 GB RAM recommended, 8GB RAM Good
  • 400 MB hard disk space + at least 1 G for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Java Development Kit (JDK) 7
  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

Mac OS X

  • Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)
  • 2 GB RAM minimum, 4 GB RAM recommended, 8GB RAM Good
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Java Runtime Environment (JRE) 6
  • Java Development Kit (JDK) 7
  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality
  • On Mac OS, run Android Studio with Java Runtime Environment (JRE) 6 for optimized font rendering. You can then configure your project to use Java Development Kit (JDK) 6 or JDK 7.

Linux

  • GNOME or KDE desktop
  • GNU C Library (glibc) 2.11 or later
  • 2 GB RAM minimum, 4 GB RAM recommended, 8GB RAM Good
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Oracle® Java Development Kit (JDK) 7

You can download the Android studio from official website:-  http://developer.android.com/sdk/index.html
If you are installing Android Studio on Mac or Linux, You can download the latest version from Android Studio Mac Download,or Android Studio Linux Download, check the instructions provided along with the downloaded file for Mac OS and Linux.

If not able to install it..... just wait for my next blog..!!
Code to make it better..!!