当前位置: 首页 > 知识库问答 >
问题:

找到不支持的Gradle DSL方法:“排除()”

华昕
2023-03-14

如果:

dependencies {
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'de.keyboardsurfer.android.widget:crouton:1.8.3'
    compile 'de.greenrobot:eventbus:2.2.0'
    compile 'com.intellij:annotations:+@jar'
    compile 'com.jpardogo.googleprogressbar:library:1.0.0'

    compile project(':floatlabel')
    compile project(':Android-SwipeToDismiss')
    compile project(':Android-UndoBar') {
        exclude group: 'com.nineoldandroids', module: 'library' // without or without this one
    }
    compile project(':AndroidSlidingUpPanel:library') {
        exclude group: 'com.nineoldandroids', module: 'library' // without or without this one
    }
}

我收到此错误消息:

Gradle 'mProject' project refresh failed: Build script error, unsupported Gradle DSL method found: 'exclude()'!

但这是可行的:

dependencies {
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'de.keyboardsurfer.android.widget:crouton:1.8.3'
    compile 'de.greenrobot:eventbus:2.2.0'
    compile 'com.intellij:annotations:+@jar'
    compile 'com.jpardogo.googleprogressbar:library:1.0.0'

    compile project(':floatlabel')
    compile project(':Android-SwipeToDismiss')
    compile project(':Android-UndoBar')
    compile project(':AndroidSlidingUpPanel:library')
}

configurations {
    all*.exclude group: 'com.nineoldandroids', module: 'library'
}

试图了解原因,请澄清!

共有1个答案

爱唯
2023-03-14

使用

compile (project(':Android-UndoBar')) {
        exclude group: 'com.nineoldandroids', module: 'library' // without or without this one
    }

所以用额外的括号。

 类似资料:
  • 当我试图通过liquibase命令行启动changelog.groovy时,它告诉我 我正在执行下一个操作: 我的LiquiBase.Properties是: driver=org.postgresql.driver classpath=c:\users\andrii\org.postgresql.driver.jar;c:\users\andrii\liquibase-3.5.1-bin\lib

  • 算法问题:给定一个非负整数列表,将它们排列成最大的数。 例如,给定[3,30,34,5,9],形成的最大数是9534330。 注意:结果可能很大,因此需要返回一个字符串,而不是整数。 而且我还在想办法避免使用额外的空间。

  • 我看得出来图书馆很好。当我不是在MainActivity.java上扩展Activity,而是将它更改为扩展ActionBarActivity(按照Google的指示)时,没有发生错误--而且它可以正确地导入。 我甚至尝试过绕过style.xml文件,并将和的直接添加到AndroidManifest.xml中,使用,但所有尝试都导致了相同的错误。 现在的问题是,我无法让它更改主题,更不用说在不抛出

  • 所以我尝试使用GCM构建一个应用程序。我已经为此打开了两个模块。后端(带有appengine和常规模块的GCM消息传递-名称为“app”(常规模块和“后端”)。 我收到了这个问题,但我找不到解决方法。 当应用程序启动时,我得到以下错误: 10-04 18:24:16.391 18920-18920/com.example.daniel.test6 E/AndroidRuntime: 致命异常: m

  • 我有Java控制器: 并遇到以下问题:警告14068--[nio-8080-exec-3].w.s.m.s.defaultHandlerExceptionResolver:Resolved[org.springframework.web.httpRequestMethodNotSupportedException:Request method'DELETE'not support]它发生在我发送删

  • 我使用S#Arplite开发了webapp,用于构建一个查询,从许多表中获取一个列表。使用NHibernate版本3.3.1.4000 当应用程序运行时,我得到了一个错误,例如 这是我的代码