Gradle sync failed: Unsupported method: NativeArtifact.getSourceFolders().

简介: Gradle sync failed: Unsupported method: NativeArtifact.getSourceFolders().

错误如下:


8:33  Gradle sync failed: Unsupported method: NativeArtifact.getSourceFolders().
  The version of Gradle you connect to does not support that method.
  To resolve the problem you can change/upgrade the target version of Gradle you connect to.
  Alternatively, you can ignore this exception and read other information from the model.
  Consult IDE log for more details (Help | Show Log) (3s 37ms)

这是因为使用的gradle版本太高导致。找到以下语句修改即可:


dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

 

目录
相关文章
|
Android开发
android学习之——Gradle sync failed: Could not determine artifacts for xxxxx
android学习之——Gradle sync failed: Could not determine artifacts for xxxxx
android学习之——Gradle sync failed: Could not determine artifacts for xxxxx
|
4月前
|
Android开发
Android Studio: 解决Gradle sync failed 错误
本文介绍了解决Android Studio中出现的Gradle同步失败错误的步骤,包括从`gradle-wrapper.properties`文件中获取Gradle的下载链接,手动下载Gradle压缩包,并替换默认下载路径中的临时文件,然后重新触发Android Studio的"Try Again"来完成同步。
1782 0
Android Studio: 解决Gradle sync failed 错误
|
Android开发
意外导致了gradle project sync failed. Basic functionality will not work properly
意外导致了gradle project sync failed. Basic functionality will not work properly
意外导致了gradle project sync failed. Basic functionality will not work properly
首次运行Flutter失败报错(Finished with error: Gradle task assembleDebug failed with exit code 1)
首次运行Flutter失败报错(Finished with error: Gradle task assembleDebug failed with exit code 1)
491 0
首次运行Flutter失败报错(Finished with error: Gradle task assembleDebug failed with exit code 1)
|
Android开发
Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
132 0
Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
|
Android开发
Gradle sync failed (3 s 402 ms) - Android Studio问题解决方法
Gradle sync failed (3 s 402 ms) - Android Studio问题解决方法
141 0
Gradle sync failed (3 s 402 ms) - Android Studio问题解决方法
|
人工智能 移动开发 Java
Android Studio插件版本与Gradle 版本对应关系
Android Studio插件版本与Gradle 版本对应关系
2576 0
Android Studio插件版本与Gradle 版本对应关系
|
存储 Java Android开发
Android 开发 - 充分利用Gradle
Android 开发 - 充分利用Gradle
179 2
|
2月前
|
Android开发
Android基于gradle task检查各个module之间资源文件冲突情况
Android基于gradle task检查各个module之间资源文件冲突情况
Android基于gradle task检查各个module之间资源文件冲突情况
|
2月前
|
Android开发
Android gradle task任务检查各个module之间资源文件冲突.md
Android gradle task任务检查各个module之间资源文件冲突.md
Android gradle task任务检查各个module之间资源文件冲突.md