Android studio usage problem summary, androidstudio
I have been using android studio for some time. I summarized some common problems encountered during this period.
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.
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.