Download URL: https://developer.android.google.cn/studio
Create a new Android folder in the D drive to store Android studio and SDK files.
After downloading, run the exe file and click next
Note that it is best not to have spaces in this path, such as the directory of program files, otherwise there will be problems when installing the sdk later.
click install
Next, wait until the installation is complete.
Then open Android studio, enter this page, and a bullet box will appear after a while, click cancel, and then click next
Select custom installation, so that you can set the directory where the sdk is installed, otherwise it will all be installed on the c drive.
Don't worry about this path, just next:
This place should choose the path to install the SDK, it is best to install it in the previously created Android folder.
If there is a space in this path, the following warning will appear, and the installed sdk may not be selected.
You can use the recommended, direct next
Finally, you can see some installation path information set before, as well as the downloaded file size.
Agree to all parts, click finish and that's it.
Wait for the installation to complete.
create project
In this version of flamingo, when creating a project, if you choose "Empty Activity", the kotlin language will be used by default.
If you want to use Java, you can choose "No Activity" or "Basic Views Activity".
problems encountered
I selected "Basic Views Activity", created "mainActivity", and selected Java as the language, but an error was reported.
I found that many things were not downloaded, so I replaced the gradle with a domestic source.
Alibaba Cloud: Alibaba Cloud Cloud Effect Maven
Aliyun warehouse address used:
https://maven.aliyun.com/repository/public
After Android Studio Dolphin 2021.3.1, the switching configuration of the domestic source has been changed from the build.gradle file to the settings.gradle file. After modification, just execute Sync.
That is to add the following string of paths to the two repositories respectively
maven {
url 'https://maven.aliyun.com/repository/public' }
The settings.gradle file needs to be selected in the view on the left Project
, and then gradle
find this file below. Android
It cannot be seen in the view.
The content of the modified settings.gradle file:
pluginManagement {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public' }
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven {
url 'https://maven.aliyun.com/repository/public' }
google()
mavenCentral()
}
}
rootProject.name = "mainActivity"
include ':app'
After modification, execute Sync; or directly click on the aboveretry
After a long period of time, a green √ appears in front of the project name on the lower left, and it is installed
But I tried it, even if I don’t change the source of maven, I retry every time I get an error, and finally the installation is successful, but the time will be longer. I installed it for about 50 minutes without changing the source; if I change the source, it only takes about 10 minutes
Start the project and find that it can run normally.