Android studio usage problem summary, androidstudio

Source: Internet
Author: User

Android studio usage problem summary, androidstudio

I have been using android studio for some time. I summarized some common problems encountered during this period.

I. font size Problems

No font options similar to those in Eclipse were found during the use of android studio. The method for adjusting the font size is as follows:

 1. File ----> Settings, find Editor

2. Check the option indicated by the arrow

Then we can press Ctrl and slide the scroll wheel to adjust the font size.

Ii. Import third-party class libraries

1. There is also a difference between importing a third-party class library and Eclipse during the development process. We will import the SlidingMenu class library, download it from github, and decompress it to the project directory.

2. restart our android studio and we will find that our class library is available under our project.

Then we need to modify the settings. gradle file under our root directory. Be sure to note that it is under the root directory. Code added in

The class library name is added and can only be modified manually. I am also helpless.

3. What we need to modify next isApp directoryBuild. gradle in the App directory. Add the following code:

dependencies {    compile project(':SlidingMenu-master')}

This is also the name of the imported class library. In this case, open File ---> Project Structure.

You can see the imported class library. At this point, we have not completed the compilation, and an error will be reported during compilation.

4. Add a build. gradle file under the SlidingMenu-master Directory of the project. The content is as follows:

buildscript {repositories {mavenCentral()}dependencies {classpath 'com.android.tools.build:gradle:0.6.+'}}apply plugin: 'android-library' repositories {mavenCentral()} android {compileSdkVersion 18buildToolsVersion "17.0.0"defaultConfig {minSdkVersion 14targetSdkVersion 18}  sourceSets {main {manifest.srcFile 'AndroidManifest.xml'java.srcDirs = ['src']resources.srcDirs = ['src']aidl.srcDirs = ['src']renderscript.srcDirs = ['src']}}}dependencies {compile 'com.android.support:appcompat-v7:+'compile files('libs/gson-2.2.4.jar')}

In this case, the SDK version may be added. You can modify the version based on your own needs. It is quite effort-consuming to import the class library to android studio.

Iii. export projects

To export an Apk in android studio, follow these steps:

 

Click Generate Signed APK

Click Create new to Create a new key, and then we will see similar options in Eclipse

Key store path our Key address

Password

Alias key name

Validity Period

Enter the First and Last names of the publisher and click OK.

Click finish to release our APK.

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.