android - android studio 3.0.1和kotlin v1.2.10-release-Studio3.0-1出现问题

标签 android android-studio gradle kotlin

我正在使用android studio 3.0.1,而我打算使用Kotlin。

我写了一些简单的代码,当应用程序运行时,android studio向我显示以下错误:

错误:等级:

A problem occurred configuring root project 'Firstapp1'.
Could not resolve all files for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:3.0.1.
Required by:
project :
Could not resolve com.android.tools.build:gradle:3.0.1.
Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
Already seen doctype.



Gradle 版本:4.1
Android插件版本:3.0.1

请帮我解决这个问题!

最佳答案

确保gradle中使用的kotlin版本和kotlin插件版本相同,如以下快照所示:
enter image description here

gradle中的版本是1.1.51

enter image description here

安装的插件版本也为1.1.51

关于android - android studio 3.0.1和kotlin v1.2.10-release-Studio3.0-1出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48183817/

相关文章:

java - Android如何从外部存储获取资源标识符

android - 在 Android 应用程序中缓存视频

android - 我可以使用 Shopify Mobile Buy SDK 为 shopify 商店构建 android 或 ios 应用程序吗?

android - 无法在 Windows 8.1 PC 中安装的 ADT 和 Android Studio 中检测到 Xperia C

android - 用户输入的撇号使 android 应用程序崩溃(与 SQL 相关)

java - :app:mergeDebugResources FAILED Android

android-studio - Android Studio中的反编译按钮(从Kotlin到Java)消失了吗?

android - input.readLine永远等待(阻止),¿如何处理?

android - Android Studio: “Exception: Gradle task assembleDebug failed with exit code -1”和SDK Manager文件夹…丢失了吗?

gradle - Android Studio 今天更新并回归