Android Studio experience and android experience

Source: Internet
Author: User

Android Studio experience and android experience

  • About Android Studio

The new IDE Android Studio released at the 2013 Google IO conference is believed to be familiar to you. As of the 2014 Google IO conference, although the official version is still available, however, according to my usage in the past few weeks, there have been few bugs, which does not affect normal use. In addition, Android Studio is based on IntelliJ idea. It is better than Eclipse in terms of running speed and programming speed, and the development efficiency is improved properly.



  • Android Studio vs Eclipse ADT


Currently, the biggest disadvantage of Android Studio is thatNDK not supportedIf NDK is used in the project, it is estimated that it will be available only after the official version.



  • Version:

As of, the latest version isCanary0.8.6 of Channel

(For more information, see the following versions: There are four channels: Canary, Dev, Beta, and Stable. The update frequency is gradually decreasing. Canary will be updated once every one or two weeks. Beta is a relatively Stable release version, and Stable is a legendary official version .)

URL:

-Http://tools.android.com/download/studio (wall split is recommended to download the latest version from here, Reason 1: green version; reason 2: Get the latest version in time(Canary version is recommended ))
-Http://developer.android.com/sdk/installing/studio.html (of course you can also download from the official website, is an installation file, and the difference is that he contains an Android L Preview SDK, in fact, we can use our own local SDK)
-Https://github.com/inferjay/AndroidDevTools)



  • Start configuring the environment

It's actually easy to talk about nonsense. You need to pay attention to the following steps:

1. From EclipseExport build. gradleFile: Export-> Android-> Generate Gradle build files, and select the project to be exported.

(Note: if there is a dependent Library project, it will automatically help you identify and select it, and export it together. If warning exists, it indicates that the build. gradle file exists in the directory,

Overwrites the Force overriding of existing file)



2. decompress the green version. ZIP file to run the studio.exe(32bit folder or studio64.exe (64-bit) in the bindirectory. FirstSet the SDK and JDK path,

On the Quick Start page, choose Configure> Project Defaults> Project Structure.



3. Return to the Quick Start interface and selectImport ProjectSelect the build. gradle file in step 1 for import. The Gradle file will be downloaded during the first import, about 50 MB,

It takes a long time and you have to wait patiently. If it succeeds, it will be successfully imported from Eclipse to Android Studio.


4,About the directory structureIf the build is generated from Eclipse. if the gradle file is imported, the original directory structure is retained. If the file is directly generated by the New Project in Android Studio, the directory structure is strange. It is the standard directory structure of Studio (note: the Project in Android Studio is equivalent to the Workspace in Eclipse,

Module is equivalent to a Project in Eclipse, which is a Project, including several modules)



5. Others: If the compilation fails after the import, it is easy to find the cause according to the Console prompts. I did not remember a few of them at the beginning,

Modify the content in the build. gradle or settings. gradle file. If you do not know how to solve the compilation error, leave a message...



Ape! What are you still hesitating about? Use it now. Android Studio is a trend, and the official version will soon become popular. It's okay to try it now, haha !!!



Android studio usage

First, go to the bin directory of Android Studio and modify studio. bat Line 3 GOTO end adds PAUSE to view the error message before it. Enter cmd and point to the Android Studio directory to run studio. bat can view the error message and modify the studio.exe under the android-studio \ bindirectory. vmoptions-XX: + UseCodeCacheFlushing for removing 5th rows, started successfully
Use NotePad to open studio. bat under the android-studio \ bin directory
SET VM_OPTIONS_FILE = % IDE_BIN_DIR % \ studio=bits=.exe. vmoptions
SETVM_OPTIONS_FILE = % IDE_BIN_DIR % \ studio1_bits0000.exe started successfully [8]
Open with a text Tool
Studio. bat
Line25 to line 28:
Set jre = % JDK %
If exist "% JRE % \ jre" set jre = % JDK % \ jre
Set bits = if exist "% JRE % \ lib \ amd64" set bits = 64
We can see that the number of system bits supported by the software is 64 bits. If your computer is a 32-bit jre/lib directory with only i386 files, try
If exist "% JRE % \ lib \ amd64" set bits = 64
If exist "% JRE % \ lib \ i386" set bits = 32 [8]
Check whether the jdk path is configured. Neither 1.6 nor 1.7 is correct. Make sure that the jdk environment variable configuration is correct.
 
Android Studio cannot be enabled

1. When a project is created for the first time, something needs to be downloaded. If some errors are prompted, check the error and open the download again to run it. It may be that the download was not completely downloaded.
2. Check whether the jdk path is configured. There is no problem in both 1.6 and 1.7.
3. run Windows 7 as an administrator.
4. Find studio.exe. vmoptions in the bindirectory and remove the line containing UseCodeCacheFlushing.
5

Use NotePad to open studio. bat under the android-studio \ bin directory
SET VM_OPTIONS_FILE = % IDE_BIN_DIR % \ studio=bits=.exe. vmoptions
SET VM_OPTIONS_FILE = % IDE_BIN_DIR % \ studio1_bits0000.exe
You can use it.
6 open it with a text Tool
Studio. bat
Line25 to line 28:
Set jre = % JDK %
If exist "% JRE % \ jre" set jre = % JDK % \ jre
Set bits =
If exist "% JRE % \ lib \ amd64" set bits = 64

We can see that the number of system bits supported by the software is 64 bits, and my own computer is a 32-bit jre/lib directory with only i386 files.
Try
If exist "% JRE % \ lib \ amd64" set bits = 64
If exist "% JRE % \ lib \ i386" set bits = 32

Reference address: my.eoe.cn/..ondesknew

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.