Friday, July 19, 2013

Getting Started with Android Studio

copied from: http://developer.android.com/sdk/installing/studio.html
-----

Getting Started with Android Studio

EARLY ACCESS PREVIEW

Download Android Studio v0.2.x
for Windows
This download includes:
  • Android Studio early access preview
  • All the Android SDK Tools to design, test, debug, and profile your app
  • The latest Android platform to compile your app
  • The latest Android system image to run your app in the emulator
Android Studio is a new Android development environment based on IntelliJ IDEA. Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging. On top of the capabilities you expect from IntelliJ, Android Studio offers:
  • Gradle-based build support.
  • Android-specific refactoring and quick fixes.
  • Lint tools to catch performance, usability, version compatibility and other problems.
  • ProGuard and app-signing capabilities.
  • Template-based wizards to create common Android designs and components.
  • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more.
Caution: Android Studio is currently available as anearly access preview. Several features are either incomplete or not yet implemented and you may encounter bugs. If you are not comfortable using an unfinished product, you may want to instead download (or continue to use) the ADT Bundle(Eclipse with the ADT Plugin).

Updating to 0.2.x


To update from Android Studio 0.1.x to 0.2.x, follow the installation instructions below and replace your existing installation.
Caution: Replacing your existing installation of Android Studio will remove any additional SDK packages you've installed, such as target platforms, system images, and sample apps. To preserve these, copy them from your current SDK directory under Android Studio to a temporary location before installing the update. Then move them back once the update is complete. If you fail to copy these packages, then you can instead download them again through the Android SDK Manager.
Windows users: Do not install Android Studio 0.2.x in the same location as 0.1.x. Doing so may cause errors such as ClassCastException or other unexpected behaviors. It's best if you remove your previous version of Android Studio 0.1.x.
Also note that due to the update to Gradle 0.5, you will encounter errors when opening existing projects. See theTroubleshooting notes below for information about how to resolve them.

Installing Android Studio


  1. Download the Android Studio package from above.
  2. Install Android Studio and the SDK tools:
    Windows:
    1. Launch the downloaded EXE file, android-studio-bundle-<version>.exe.
    2. Follow the setup wizard to install Android Studio.
      Known issue: On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.
      Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for exampleC:\Program Files\Java\jdk1.7.0_21.
    Mac OS X:
    1. Open the downloaded DMG file, android-studio-bundle-<version>.dmg.
    2. Drag and drop Android Studio into the Applications folder.
      Known issue: Depending on your security settings, when you attempt to open Android Studio, you might see a warning that says the package is damaged and should be moved to the trash. If this happens, go to System Preferences > Security & Privacy and under Allow applications downloaded from, select Anywhere. Then open Android Studio again.
    Linux:
    1. Unpack the downloaded Tar file, android-studio-bundle-<version>.tgz, into an appropriate location for your applications.
    2. To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.
      You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.
That's it! You're ready to start developing apps with Android Studio.
Note: On Windows and Mac, the individual tools and other SDK packages are saved within the Android Studio application directory. To access the tools directly, use a terminal to navigate into the application and locate the sdk/directory. For example:
Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
Mac: /Applications/Android\ Studio.app/sdk/
For a list of some known issues, see tools.android.com/knownissues.

Starting a Project


When you launch Android Studio for the first time, you'll see a Welcome screen that offers several ways to get started:
  • To start building a new app, click New Project.
    This starts the New Project wizard, which helps you set up a project using an app template.
  • To import an existing Android app project, click Import Project.
    Note: If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system. For more information, read Migrating from Eclipse.
For additional help using Android Studio, read Tips and Tricks.
As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the Android Support Library. To install more packages, use the SDK Manager, which you can open from Android Studio by clicking SDK Manager  in the toolbar.

Revisions


Note: There is not a patch update available from 0.1.9 to 0.2. To update from Android Studio 0.1.x to 0.2.x, you must install a new Android Studio bundle from this page. The reason for that is that we have made changes to the bundled SDK such that it includes a pre-configured local Maven repository which can serve up the v4 support library and which is required for creating new projects.
Android Studio v0.2.x (July 2013)
  • Merged in the latest IntelliJ codebase changes. Includes fixes for issues reported by Studio users such as tweaks to Linux font sizes and font rendering.
  • Android Gradle plug-in updated to 0.5.0.
    Caution: This new version is not backwards compatible. When opening a project that uses an older version of the plug-in, Studio will show an error stating Gradle <project_name> project refresh failed. See Troubleshooting below for details.
    The updated Gradle plug-in includes the following changes:
    • Fixed IDE model to contain the output file even if it's customized through the DSL. Also fixed the DSL to get/set the output file on the variant object so that it's not necessary to use variant.packageApplication or variant.zipAlign
    • Fixed dependency resolution so that we resolved the combination of (default config, build types, flavor(s)) together instead of separately.
    • Fixed dependency for tests of library project to properly include all the dependencies of the library itself.
    • Fixed case where two dependencies have the same leaf name.
    • Fixed issue where Proguard rules file cannot be applied on flavors.
    All Gradle plugin release notes are available are here: http://tools.android.com/tech-docs/new-build-system.
  • Gradle errors from aapt no longer point to merged output files in the build/ folder, they point back to the real source locations.
  • Parallel Builds. It's now possible to use Gradle's parallel builds. Please be aware that parallel builds are in "incubation" (see Gradle's documentation.) This feature is off by default. To enable it, go to Preferences > Compilerand check the box Compile independent modules in parallel.
  • Further work on the new resource repository used for layout rendering, resource folding in the editor, and more:
    • Basic support for .aar library dependencies (e.g. using a library without a local copy of the sources). Still not working for resource XML validation and navigation in source editors.
    • Cycle detection in resource references.
    • Quick Documentation (F1), which can show all translations of the string under the caret, will now also show all resource overlays from the various Gradle flavors and build types, as well as libraries. They are listed in reverse resource overlay order, with strikethrough on the versions of the string that are masked.
    • Fixes to handle updating the merged resources when the set of module dependencies change.
    • XML rendering fixes to properly handle character entity declarations and XML and unicode escapes.
  • Save screenshot support for the layout preview and layout editor windows.
  • Template bug fixes.
  • Lint bug fixes.
  • Various fixes for crash reports. Thank you, and keep filing crash reports!

Note: Periodic updates are pushed to Android Studio without requiring you to update from here. To manually check for updates, select Help > Check for updates (on Mac, select Android Studio > Check for updates).

Troubleshooting


Figure 1. Error dialog when opening an existing project.

Error: Gradle project refresh failed

Android Studio 0.2.0 has updated the Gradle plug-in to 0.5.0, which is not backwards compatible. When opening a project that uses an older version of the plug-in, Studio will display the error shown in figure 1 in the upper right corner of the IDE. To resolve the error, you must change the version of the Android Gradle plug-in to 0.5.0.
  1. Click the link in the error dialog Search in build.gradle files. If the dialog is no longer visible, click Event Log  in the bottom-right corner of the IDE, then click Search in build.gradle files.
  2. Double-click the line under the build.gradle usage. For example: classpath 'com.android.tools.build:gradle:0.4. This opens the project build.gradle file.
  3. Edit the classpath to change the gradle version to 0.5.+. For example:
    dependencies {
      classpath 'com.android.tools.build:gradle:0.5.+'
    }
    
  4. Save the file and rebuild your project.
Figure 2. Error dialog when creating a new project or opening a project using the support library.

Error: Failed to import Gradle project

If, after updating to Android Studio 0.2.x and creating or opening a project, you receive an error stating "Could not find any version that matches com.android.support:support-v4:13.0.+", then you must install the Android Support Repository. This was likely caused because you're pointing Android Studio to an external Android SDK location that does not have the new Maven repository included with Android Studio 0.2.x. This new Maven repository is used by the new build system for the Support Library, instead of using the Support Library JAR files, so must be present in the SDK.
  1. Open the Android SDK Manager.
  2. Expand the Extras directory and install Android Support Repository.
If you've encountered other problems in Android Studio, look at the following page for possible resolutions to known issues: http://tools.android.com/knownissues.

Getting Started With MySQL

copied from: http://dev.mysql.com/usingmysql/get_started.html
-----

Get Started with MySQL

Installing MySQL

One of the reasons MySQL is so popular is that it runs on so many platforms. Whether you run Windows, Mac OSX, Linux, OpenSolaris, or some other platform, there is likely a matching version of MySQL. Because each of these popular platforms is unique, so are the installation procedures for them. In this section, we provide links to tutorials that details how to install MySQL on your platform of choice.

Installing MySQL on Windows

Installing MySQL on Mac OS X

Installing MySQL on Linux

Just as there are various flavors of Linux, there are many different ways to install MySQL on Linux distributions. The following are some links to resources that Linux users should find helpful.

MySQL Tutorial

Getting Started with MATLAB

copied from: http://www.mathworks.com/videos/getting-started-with-matlab-68985.html
-----

Getting Started with MATLAB

Get started with MATLAB® and learn how to get more information.