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博客

  • 14
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值