Build was configured to prefer settings repositories over project repositories

这篇具有很好参考价值的文章主要介绍了Build was configured to prefer settings repositories over project repositories。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle'

这段话的大概意思就是:比起在 build.gradle(project)下配置,在 setting.gradle 下配置更合适,但是 build.gradle 却配置了 maven 。

在报错提示下,去查看project的build.gradle,发现配置了 maven,解决办法就是把 allprojects 闭包下的内容全部转移到 setting.gradle 配置文件中。

build was configured to prefer settings repositories over project repositori,maven,gradle,android,Powered by 金山文档

如下图:

build was configured to prefer settings repositories over project repositori,maven,gradle,android,Powered by 金山文档

把 allproject 闭包转移到 setting.gradle 之后,重新编译运行即可。文章来源地址https://www.toymoban.com/news/detail-773550.html

到了这里,关于Build was configured to prefer settings repositories over project repositories的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • Android Your build is currently configured to use Java 17.0.6 and Gradle 6.5.

    Android Your build is currently configured to use Java 17.0.6 and Gradle 6.5.

    Android 项目报错 原因:是因为 Java 版本和 Gradle 版本不匹配,可以调节 Java 版本或者 Gradle 版本,但是改动 Gradle 风险比较大,有可能会导致其他问题,所以推荐修改 Java 版本,如果熟练可以忽略随便调整。 当前报错意思是:当前编译配置是 Java 17.0.6 ,如果需要使用这个版本

    2024年02月19日
    浏览(12)
  • Jenkins构建失败提示ERROR: Couldn‘t find any revision to build. Verify the repository and branch ...

    Jenkins构建失败提示ERROR: Couldn‘t find any revision to build. Verify the repository and branch ...

    问题现象 :在jenkins的使用过程中,创建好项目后,执行构建的后,任务失败,查询控制台输出打印如下:  错误提示为:ERROR: Couldn\\\'t find any revision to build. Verify the repository and branch configuration for this job. 问题原因: Jenkins调用git时用了默认的*/master,而gitlab默认使用的是main,打

    2024年02月11日
    浏览(10)
  • CMake Error: CMake was unable to find a build program corresponding to “MinGW Makefiles“.解决方案(亲测有效)

    CMake Error: CMake was unable to find a build program corresponding to “MinGW Makefiles“.解决方案(亲测有效)

    CMake编译OpenCV4.6.0过程中一直出错: CMake Error: CMake was unable to find a build program corresponding to “MinGW Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. 解决方案如下: 将CMAKE_MAKE_PROGRAM项后面的路径设置为Qt安装路径下的路径。例如:D:/Qt/Qt5.12.12/Tools/mingw7

    2024年02月15日
    浏览(45)
  • Unsupported Java. Your build is currently configured to use Java 17.0.7 and Gradle 6.1.1.

    Unsupported Java. Your build is currently configured to use Java 17.0.7 and Gradle 6.1.1.

    不支持的Java,你的构建当前配置使用的是Java17和Gradle6.1.1。因为Gradle6.1.1需要的是Java11,所以使用Android Studio默认的Java17肯定报错。 以上是报错信息的截图,以下是报错信息的具体内容。 https://pan.baidu.com/s/1H4HLreSVagAUFGlcf-PzqQ?pwd=ff9n 提取码:ff9n 安装时候一直点下一步即可,安

    2024年02月01日
    浏览(13)
  • Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 5.4.1.

    解决此问题的方法是升级 Gradle 包装器(Gradle wrapper)到 7.2 版本,并重新导入项目。升级 Gradle 包装器会自动下载并使用指定版本的 Gradle。 请按照以下步骤进行操作: 打开项目文件夹,找到包含 Gradle 相关文件的目录。通常,这个目录名为 “gradle”。 在该目录中,找到名为

    2024年02月06日
    浏览(15)
  • Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 6.8.3.

    Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 6.8.3.

    Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 6.8.3. 翻译: 不支持的 Java。您的构建当前配置为使用 Java 17.0.6 和 Gradle 6.8.3。 这个翻译害死人,其实要表达的意思就是 gradle 版本和 java 版本不匹配,导致无法编译成功 知道版本不匹配,那就简单了 那么现在就有

    2024年02月11日
    浏览(12)
  • Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 7.0.2.

    Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 7.0.2.

    导入别人项目时出现的bug,提示java环境版本和Gradle版本不匹配 因为导入的项目所需的gradle版本对应的是java8,而Android Studio 2022.2.1 版本自带的java版本为17,它会使用默认的java版本去编译项目,所以编译时导致报错。 点击File -- Settings 进入后搜索Gradle 这里看到jdk版本默认用的

    2024年02月13日
    浏览(10)
  • 问题记录:jenkins流水线报错ERROR: Couldn‘t find any revision to build. Verify the repository and branch config

    注意配置的gitlab仓库地址是否正确, 是否少一个端口号 ,这是gitlab本身问题,导致的URL不正确。 gitlab配置不正确时可能如下: git@1 92 .1 68 . 130 . 1 31/ xxx / yyy .git 也就是clone时去访问80端口去了? 而实际上宿主机80端口已被占用为其他组件的访问地址,此时去访问80的 xxx/yyy.

    2024年02月03日
    浏览(12)
  • Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

    Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

    当出现此错误时,一般通过直接搜索该错误,其他指南给出的解决办法不一定适用于自己的情况。需要根据报错内容中具体的error找到解决方案。 个人报错情况如下  根本错误在于Microsoft Visual C++ 14.0 or greater is required. 解决方法 重新安装c++的各个版本没有用,即便我的电脑上

    2024年02月13日
    浏览(18)
  • Unsupported Java. Your build is currently configured to use Java 1.8.0_192 and Gradle 5.6.4.

    Unsupported Java. Your build is currently configured to use Java 1.8.0_192 and Gradle 5.6.4.

    打开android的一个项目结果打不了报错 Unsupported Java.  Your build is currently configured to use Java 1.8.0_192 and Gradle 5.6.4. Possible solution:  - Open Gradle wrapper settings, change `distributionUrl` property to use compatible Gradle version and reload the project 错误尝试一: 刚开始真的看日志以为是不是配置的jdk版

    2024年03月14日
    浏览(9)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包