Solutions for common problems with Android Studio

Source: Internet
Author: User

One, the problem of sticking to death

The program will be stuck in this step when you create a new project


Reason: As will automatically download the relevant Gradle package, this machine is gradle-2.2.1-all, not down so will always be stuck here

Solution: Get yourself a gradle bag.

Steps:

1. Force shutdown of Android Studio with Task Manager

2. Into the project/gradle/wrapper, the native environment


3. Open Gradle-wrapper.properties to see the following:


The last line is. Change directly to: Distributionurl=gradle-2.2.1-all.zip, then put the good gradle bag in (gradle-2.2.1-all.zip:http://download.csdn.net/ detail/u011170682/8330357),



So you can open it.

Another method: (This is faster, specify the wrong Distributionurl, enter the program and then modify the Gradle location)

Or you can not put the downloaded package in, only modify the Distributionurl, open project again can be opened directly. Then modify the Gradle in Setting-gradle to specify a valid location:


Every time you create a new project, it's a hassle--no good solution for the moment.

Second, Activity_main.xml cannot preview the problem (Android Studio 1.2)

After the new project is complete, you cannot generate a preview map:


Workaround: Modify the file Values/styles.xml content:


Add "Base." Before theme in the parent. Can

Android Studio New Project solutions to some problems

One, the problem of sticking to death

The program will be stuck in this step when you create a new project

Reason: As will automatically download the relevant Gradle package, this machine is gradle-2.2.1-all, not down so will always be stuck here

Solution: Get yourself a gradle bag.

Steps:

1. Force shutdown of Android Studio with Task Manager

2. Into the project/gradle/wrapper, the native environment

3. Open Gradle-wrapper.properties to see the following:

The last line is. Change directly to: Distributionurl=gradle-2.2.1-all.zip, then put the good gradle bag in (gradle-2.2.1-all.zip:http://download.csdn.net/ detail/u011170682/8330357),

So you can open it.

Another way:

Or you can not put the downloaded package in, only modify the Distributionurl, open project again can be opened directly. Then modify the Gradle in Setting-gradle to specify a valid location:

Every time you create a new project, it's a hassle--no good solution for the moment.

Second, Activity_main.xml cannot preview the problem (Android Studio 1.2)

After the new project is complete, you cannot generate a preview map:

Workaround: Modify the file Values/styles.xml content:

Add "Base." Before theme in the parent. Can


Recommended Link: http://www.jianshu.com/p/f7de559b9752

Reprint Please specify source: Http://blog.csdn.net/miaoyunzexiaobao

Solutions for common problems with Android Studio

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.