gpt4 book ai didi

java - 配置 ChatCamp Sdk 并导入示例项目时出现错误

转载 作者:行者123 更新时间:2023-12-02 02:19:12 26 4
gpt4 key购买 nike

****配置时

ChatCamp

SDK 与我的项目的compileSdkVersion 25 出现同步错误****

Error:(33, 0) Gradle DSL method not found: 'implementation()' Possible causes:

  • The project 'ChatCamp' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 2.3.1 and sync project
  • The project 'ChatCamp' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • 使用编译 sdk 26

    Error:(33, 0) Gradle DSL method not found: 'implementation()' Possible causes:

  • The project 'ChatCamp' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 2.3.1 and sync project
  • The project 'ChatCamp' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • ***导入时

    Sample Project*** in Android Studio 2.3.1

    示例项目 gradle 版本 4.1Android插件|版本3.0.1错误:此 Gradle 插件需要能够请求 IDE 模型级别 3 的较新 IDE。对于 Android Studio,这意味着版本 3.0+

    如果发生更改> 示例应用程序 gradle 版本 4.1 至 3.4.1 和 android 插件版本 3.0.1 至 2.3.1然后我得到-

    Error:(6, 0) Gradle DSL method not found: 'google()' Possible causes:

  • The project 'ChatCamp-Android-Example-master' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 2.3.1 and sync project
  • The project 'ChatCamp-Android-Example-master' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • 最佳答案

    您遇到此问题是因为样本 https://github.com/ChatCamp/ChatCamp-Android-Example使用大于 3.0.0 的 gradle 版本。 Gradle 3.0.0 中有一些重大变化。你可以看看如何迁移到新版本的gradle here .
    如果你想运行this sample在旧版本的 gradle 中,您只需要将 implementation 替换为 compile,将 testImplementation 替换为 testCompileandroidTestImplementation androidTestCompile

    关于java - 配置 ChatCamp Sdk 并导入示例项目时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48762357/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com