Android FAQs Summary (ii)

Source: Internet
Author: User

1, layout file LinearLayout linear layout add content error.
Workaround:
Linear layout LinearLayout The elements in the package are extra 1 you need to add the Android:orientation property.

2, Android app app how to set the icon
Workaround
In the Androidmanifest.xml file, under Application tags Android:icon and Android:roundicon are set icon properties. The latter sets the circle icon.

3, can not create new class class, new category error
Workaround
No templates or modified templates cause errors in File->settings->editor->file and Code Templates->class
Remove the original code by adding the following code:
#if (${package_name} && ${package_name}! = "") package ${package_name}; #end
#parse ("File Header.java")
public class ${name} {
}

4, Android Getting started to a proficient companion development environment is eclipse. To try to use the Androidstudio development environment, there was a problem with the version you downloaded, as shown in 1.

Figure 1
Workaround:
To send readers 0 basic Android books supporting the AndroidStudio2.3.1 development environment.
5, the use of Baidu map in Android questions.

Figure 2
Workaround:
Tests the reader's problematic code without testing the reader's question.
6, import the project source code for a long time display 3 of the dialog box shown!

Figure 3
Workaround:
View the Gradle version number for which you want to import the source code, and then download the gradle corresponding version of the compressed package at the http://services.gradle.org/distributions/URL. The package is then copied to the Androidstudio save Gradle in the folder that corresponds to 4.

Figure 4
7, when building the Androidstudio development environment, did not download the specified development environment version according to the book, so there are a variety of different errors.
Workaround:
For the above problems, most of the remote way to help the reader to debug, this can help the reader to build the development environment of the operation steps.
8. How to import an Eclipse project into the Androidstudio development tool
Workaround:

    1. First select File---Export in Eclipse, select "Generate Gradle Build Files": 5.

      Figure 5
    2. Click the Next button to display the dialog box shown in 6.

      Figure 6
    3. Click the Next button to select the project file you want to export, as shown in 7.

      Figure 7
      4. Click the Next button, and then click the Finish button in the Generate Gradle Build Files dialog box to export the project file, as shown in 8.

      Figure 8
      5. Open the Androidstudio development tool and select Import Project (Eclipse ADT, Gradle, etc) in the Welcome dialog box. option, shown in 9.

      Figure 9
      6. Then select the Eclipse Project to import, as shown in 10.

      Figure 10
      7. Click the OK button to import the Eclipse project file, as shown in 11.

      Figure 11
      9. When is the final written in the head?
      When declaring properties, methods, and classes in Java, you can use the keyword final to decorate.
      The final variable is a constant and can only be assigned once;
      The final method cannot be overridden by a quilt class;
      The final class cannot be inherited.
      10. The project cannot load the file, as shown in 1.

      Figure 1
      Workaround:
      Manually download the Gradle toolkit or wait for Androidstudio to complete and load, clean up the project, or click Try again.

Android FAQs Summary (ii)

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.