Android Studio 2022.3 new version of flamingo installation steps and problems encountered

Download URL: https://developer.android.google.cn/studio

Create a new Android folder in the D drive to store Android studio and SDK files.

insert image description here

After downloading, run the exe file and click next

insert image description here
insert image description here

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.
insert image description here

click install

insert image description here

insert image description here

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

insert image description here

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.

insert image description here

Don't worry about this path, just next:
insert image description here

insert image description here

This place should choose the path to install the SDK, it is best to install it in the previously created Android folder.

insert image description here

insert image description here

If there is a space in this path, the following warning will appear, and the installed sdk may not be selected.

insert image description here

You can use the recommended, direct next

insert image description here

Finally, you can see some installation path information set before, as well as the downloaded file size.
insert image description here

Agree to all parts, click finish and that's it.

insert image description here

Wait for the installation to complete.

insert image description here

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".

insert image description here

insert image description here

problems encountered

I selected "Basic Views Activity", created "mainActivity", and selected Java as the language, but an error was reported.

insert image description here

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

insert image description here

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 gradlefind this file below. AndroidIt cannot be seen in the view.

insert image description here

insert image description here

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

insert image description here

After a long period of time, a green √ appears in front of the project name on the lower left, and it is installed

insert image description here

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.

insert image description here

Guess you like

Origin blog.csdn.net/Charonmomo/article/details/130884035