Instructions for Installing Android Development Install the Java sdk (software development kit) se



Download 6.32 Kb.
Date30.06.2017
Size6.32 Kb.
#22104
TypeInstructions
Instructions for Installing Android Development


  1. Install the Java SDK (software development kit) SE (standard edition)

  2. Install an IDE (integrated development environment). NetBeans is a very good one to use, although I have found that a great many on-line examples use Eclipse. Currently, the Android community tends to use “Android Studio” (based on Eclipse), which bundles the IDE, Java, and Android together.

  3. Install the Android SDK. I did not opt for the “bundle” as we already had the NetBeans environment set up. On installation, I ran into trouble with the installer not locating the Java environment. I had to set an environment variable (go to Control Panel/Users). This also meant I had to log out and in again to recognize the variable.

  4. The default destination for the Android SDK was: C:\Users\user\AppData\Local\Android\android-sdk

On a home computer, you may leave that as is, but on a network computer it is good to change that so that all uses on the computer have access. Use C:\android

  1. On running the SDK installation, it selected a number of packages. You don’t need to add previous versions of Android, but you may want to add the Google USB driver and the HAXM (hardware acceleration manager).

  2. Go to “Tools/Manage AVDs”. This is for Android Virtual Devices. If you want to program for a specific mobile device, you may have to download it, but I simply chose the Nexus 4 or the Galaxy device and named it “device1.” On windows you will need to keep the memory less than 768. You may opt for a front camera (emulated) and you may want to put 200 into the SD card. Here is the screen shot of what I put in:





  1. Click ok and be sure it creates the device correctly. Then select it and click start to launch it. It takes a long time for it to go through the process of emulating the device. It eventually “boots up”. When you exit it, theoretically it should take less time next you do it if you have selected “snapshot.”

  2. Time to set up NetBeans. Launch NB and go to “Tools/Plugins/Settings.” Add a new site to check with the URL: http://nbandroid.org/release72/updates/updates.xml. This should automatically check the site and put “Android” into the tab for “Available Plugins”. Select it and click “install” at the bottom.





  1. Now you need to go to NetBeans’ “Tools/Options/Miscellaneous.” You should see a Tab for Android. Browse for the location of the Android SDK. See step 4. Mine was:

C: \Android\android-sdk.

  1. Now you can create an Android project. Go to File/New Project and select “Android project”. On the next dialog, you have to specify a project location (user folder), a project name, a target (I used the first option—Android 4.4), and a package name. For some reason, package names have to have 2 parts: MyFirst.Project. Here is my entire dialog bog:




  1. Netbeans is smart enough to make the entire project except for a file called “R”, and it gives you an error message in “MainActivity.java.” If you build the project, it will create this file for you and the error message will go away.

  2. In running the project, you have to go to Project/Properties. Under “Run” options, you need to have it use your project instead of the default activity.




Download 6.32 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page