【问题标题】:Getting " Gradle sync failed " on Xabber import在 Xabber 导入时出现“Gradle 同步失败”
【发布时间】:2016-08-11 02:13:54
【问题描述】:

我正在将xabber 演示从 github 导入到我的 android studio 中。并显示错误-

Gradle sync failed: Configuration with name 'default' not found.

我尝试更改外部 gradle,但这没有用,我在同步我的 gradle 时仍然遇到同样的错误。我的外部 gradle 是 -

// Top-level build file where you can add configuration options      
common to all sub-projects/modules.
buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
}
}

allprojects {
repositories {
    jcenter()
}
}

settings.gradle 是

include ':xabber'
include ':xabber:otr4j'
include ':xabber:MemorizingTrustManager'
include ':xabber:emojicon'

我也尝试过使用来自this SO Question 的提示,但没有成功。

有没有人提出建议或遇到同样的情况并解决了,请帮忙。

【问题讨论】:

    标签: android android-studio xmpp android-gradle-plugin ejabberd


    【解决方案1】:

    当某些项目配置不可用时,这是多项目 Gradle 设置中的常见错误。 Gradle 尝试为 settings.gradle 中的每个项目列表加载配置,但其中一些失败。尝试使用 git 命令获取子项目:git submodule update --init --recursive 或者如果您只是下载存档 - 检查 xabber/otr4jxabber/MemorizingTrustManagerxabber/emojicon 目录,每个目录都有 build.gradle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-17
      • 1970-01-01
      • 2015-12-11
      • 2021-11-01
      • 2019-03-27
      • 1970-01-01
      • 2018-05-30
      • 2023-03-05
      相关资源
      最近更新 更多