Android studio环境搭建过程异常

异常:Connect timed out

创建新项目时,提示time out 

解决方案:修改gradle下载地址,使用国内镜像地址


distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip

修改成

distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.2-bin.zip

异常

e: file:///D:/project/AndroidProject/settings.gradle.kts:5:21: 
Unexpected tokens (use ';' to separate expressions on the same line)
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
//        google()
//        mavenCentral()
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }

    }

修改maven引用方式

    repositories {
//        google()
//        mavenCentral()
//        maven { url 'https://maven.aliyun.com/repository/google' }
//        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
//        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }

        maven { url=uri("https://maven.aliyun.com/repository/google")}
        maven { url=uri("http://maven.aliyun.com/nexus/content/groups/public/")}
        maven { url=uri("http://maven.aliyun.com/nexus/content/repositories/jcenter")}

    }

异常

Build file 'D:\project\AndroidProject\build.gradle.kts' line: 2

Error resolving plugin [id: 'com.android.application', version: '8.2.1', apply: false]
> Could not resolve all dependencies for configuration 'detachedConfiguration1'.
   > Using insecure protocols with repositories, without explicit opt-in, is unsupported.

* Try:
> Switch Maven repository 'maven2(http://maven.aliyun.com/nexus/content/groups/public/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols.
> For more information, please refer to https://docs.gradle.org/8.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol in the Gradle documentation.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

解决方法:修改了JDK版本17,

异常:

Plugin [id: 'org.jetbrains.kotlin.android', version: '1.9.0', apply: false] was not found in any of the following sources:
 

国内镜像发现不了对应插件

手动安装插件

Versions: Kotlin - IntelliJ IDEs Plugin | Marketplace (jetbrains.com)

下载插件,选择了一个223-1.9.0,下载,通过下面的步骤手动安装插件,但是提示异常

异常信息

插件版本错误导致

在这里可以查看版本号

选择对应的插件

安装成功,重启Android studio

重启报错:

com.intellij.ide.plugins.PluginManagerCore$EssentialPluginMissingException: Missing essential plugins:

解决方法:安装IDEA出现Missing essential plugins: com.intellij (platform prefix: null)如何解决_com.intellij.ide.plugins.pluginmanagercore$essenti-CSDN博客

相关推荐

  1. KAFKA环境

    2024-01-28 07:08:02       35 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-28 07:08:02       10 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-28 07:08:02       12 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-28 07:08:02       11 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-28 07:08:02       14 阅读

热门阅读

  1. 用OpenSSL生成哈希密钥

    2024-01-28 07:08:02       32 阅读
  2. MacOS安装Podman替代docker

    2024-01-28 07:08:02       36 阅读
  3. docker数据卷的使用

    2024-01-28 07:08:02       31 阅读
  4. gpt写的go语言入门——通过博客系统 part1

    2024-01-28 07:08:02       32 阅读
  5. 阿里云上传文件

    2024-01-28 07:08:02       32 阅读
  6. 力扣122双周赛

    2024-01-28 07:08:02       29 阅读
  7. 78.Go中的Timer 和 Ticker

    2024-01-28 07:08:02       23 阅读
  8. 阿里云云数据库RDS

    2024-01-28 07:08:02       26 阅读