Friday, July 27, 2018

MADLAB1


Experimet 1

Sunday, July 22, 2018

MAD LAB Exp1


1.INSTALLING ANDROID SDK AND ECLIPSE ADT PLUGIN
Environment Used
§  Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
§  JDK 6 (Java SE 6). To install JDK, refer these links; in WindowsUbuntu
o   JRE alone is not sufficient
§  Android SDK 4.0.4 (Ice Cream Sandwich)
o   android-sdk_r18
§  ADT Plugin for Eclipse

INSTALLING ECLIPSE IDE
Environment Used:
§  Eclipse Indigo (3.7.1) IDE.
§  Java SE (JDK/JRE) 6.
Installing Java JDK/JRE
You will need Java SE Runtime Environment (JRE) to use Eclipse. You can read this page to install JDK/JRE and then return here to continue the Eclipse installation.
Downloading Eclipse
If you need to install Eclipse, you can download it from this location:
The latest version of Eclipse IDE for Java EE Developers is recommended. Choose 32-bit or 64-bit depending on your OS version.
For Windows: The file extension will be .zip
For Linux: The file extension will be .tar.gz
Installing Eclipse
To install Eclipse, all you do is extract the zip (or tar.gz) file in the desired directory. No further work is required. When you unzip the file, it creates a subdirectory called “eclipse”, with multiple subdirectories under that. So, for example, in Windows you could unpack the zip file in the root directory (e.g., C:\) and Eclipse would be installed in C:\eclipse.
Launching Eclipse
Eclipse Application
In the eclipse folder you will find the eclipse.exe application (a big blue icon). You can double click on this to launch Eclipse IDE. We recommend you to create a shortcut on the desktop to simplify the launching of Eclipse.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-eclipse-ide_277/eclipse1.jpg?c3a9c1

Launch Eclipse

Double-click the “eclipse.exe” file you installed OR the shortcut you may have created.

Select workspace

After launching, Eclipse will ask you to specify the workspace to use. The workspace is a folder used by eclipse to keep all your projects. Select the folder where you want the workspace to be created or accept the default provided by Eclipse.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-eclipse-ide_277/eclipse2.jpg?c3a9c1

Finish

Press OK to continue.

Welcome Screen

After pressing OK, you will see the following window.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-eclipse-ide_277/eclipse3.jpg?c3a9c1

To start working on Eclipse, you can either click on the curved arrow (Workbench) on the top right most corner or close the Welcome tab and you will see the following window.

INSTALLING JDK ON WINDOWS
Environment Used
§  Java SE 6 Update 29
§  Windows (XP/Vista/7) OS
Downloading Java Development Kit (JDK):
You can download latest version of JDK from this location
Click on the download link to go to the download page.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/download-jdk1.jpg?c3a9c1


http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/download-jdk-2.jpg?c3a9c1
Download the JDK suitable for your system requirement (Windows x86 for 32bit windows or Windows x64 for 64bit windows) to a safe location on your machine.

Installing Java Development Kit (JDK):

Step 1:

Double click the downloaded JDK exe file. Click the “Next” button.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/install-jdk-1-300x227.jpg?c3a9c1

Step 2:

The “Custom Setup” window allows you to select which parts of the JDK you want to install. If you want to change the installation directory click on change and specify the location where jdk will be installed. It is recommended to stick with the default settings. Click the “Next” button.

http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/install-jdk-2-300x227.jpg?c3a9c1

Step 3:

JDK “installing” window appears. It will take a few minutes to install the program features of the JDK.

http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/install-jdk-3-300x227.jpg?c3a9c1

Step 4:

By installing JDK, JRE will also be installed. Select Java Runtime Environment (JRE) installation location.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/install-jdk-4-300x227.jpg?c3a9c1http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/install-jdk-5-300x227.jpg?c3a9c1

Step 5:

When the “Complete” screen appears, click on the “Finish” button. Now you have successfully installed the Java Development Kit!
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/install-jdk-6-300x227.jpg?c3a9c1

Configuring the installed JDK on Windows:
The installed JDK must be configured to the windows environment so that the Java compiler (javac) and runtime (java) becomes available for compiling and running the Java application from any location on Windows.
NOTE: If JDK is not configured on windows environment then to compile and run your Java applications you must place them in <JAVA_HOME>/bin/ folder.
For Windows Vista/7:
1.   Click on Start -> Right click Computer -> Select Properties
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/config-jdk-1.jpg?c3a9c1

  1. Click on “Advanced system settings” from left side Tasks menu.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/config-jdk-2.jpg?c3a9c1

1.     Click on “Advanced” tab and click on “Environment Variables…”.
NOTE: For earlier Windows version:
Right click “My Computer” -> Select “Properties” -> “Advanced” tab and click on “Environment Variables…”
2.     Select Path variable from “System variables” and click on “Edit…” and go to the end of the “Variable Value” and place a semi-colon (;) and add “<Your JDK installation folder>\bin” path as shown below.
3.     Create new variable from “System variables” and variable Name is CLASSPATH and go to the end of the “Variable Value” and place a semi-colon (;) and add “<Your JDK installation folder>\lib” .

http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/config-jdk-3.jpg?c3a9c1



1.     Click OK -> OK -> OK. Now you have successfully configured JDK and ready to develop applications in Java.
2.     Now open Command prompt and type “javac -version” and it should show the version number which you installed.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-jdk-in-windows_247/javac.jpg?c3a9c1
javac is the primary Java compiler, included in the Java Development Kit (JDK).
Also type “java -version” which is Java runtime included in JDK. Sometimes you may want to restart the computer for the PATH settings to take effect.
Download and Install SDK Starter Package
Get the latest version of the SDK starter package from the link given below,
http://developer.android.com/sdk/index.html
The SDK starter package is not a full development environment – it includes only the core SDK Tools. You can use Android SDK Manager, part of SDK tools to download the rest of the SDK packages (such as the latest Android platform).
Using Windows Installer (.exe file)
If you downloaded the Windows installer (.exe file), run it to install the SDK Tools into a default location (For simplicity and easy access, I have used C:\Android\android-sdk).
Installing Android platform
When you complete the installation wizard, it will launch the Android SDK Manager with a default set of platforms and other packages selected for you to install. Simply click Install to accept the recommended set of packages and install them.
http://theopentutorials.com/totwp331/wp-content/uploads/installing-android-sdk-and-eclipse-adt-plugin_2553/11.android-sdk-adding-packages.jpg?c3a9c1
This might take sometime to install the selected platforms and packages.
Using .zip or .tgz file
If you downloaded a .zip or .tgz (for Linux) package, extract it to a safe location on your machine, for example, C:\Android\android-sdk.
After extracting the files, open SDK Manager to install the recommended platform and other packages as shown in the above step.
Install ADT plugin for Eclipse
ADT plugin for Eclipse IDE lets you quickly set up new Android projects, create an application UI, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.
§  Open Eclipse IDE
§  Select Help -> Install New Software…
§  Click Add, in the top-right corner.
§  In the Add Repository dialog that appears, enter the name as “ADT Plugin” and the Location as
https://dl-ssl.google.com/android/eclipse/
§  http://theopentutorials.com/totwp331/wp-content/uploads/installing-android-sdk-and-eclipse-adt-plugin_2553/7.android-eclipse-adt-plugin-install.jpg?c3a9c1Click OK.

§  In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
§  In the next window, you’ll see a list of the tools to be downloaded. Click Next.
§  Read and accept the license agreements, then click Finish.
  • When the installation completes, restart Eclipse.

Configuring the ADT Plugin in Eclipse

After installing the ADT plugin, you have to define the location of the Android SDK in Android preferences in Eclipse:
§  Select Window -> Preferences… to open the Preferences panel.
§  Select Android from the left panel.
o   You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.
§  For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory. In my case, it is C:\Android\android-sdk
§  Click Apply, then OK.
Adding Platforms and Other Packages
To download and install additional platforms and other essential SDK packages use Android SDK Manager.
You can launch the Android SDK Manager in one of the following ways:
§  From within Eclipse, select Window -> Android SDK Manager.
§  On Windows, double-click the SDK Manager.exe file available at installed directory.
§  On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute:
android
To download and install packages, use the graphical UI of the Android SDK Manager to browse the SDK repository and select new or updated packages.