首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >only buildscript {}, pluginManagement {} and other plugins {} script blocks

only buildscript {}, pluginManagement {} and other plugins {} script blocks

原创
作者头像
用户10171634
发布2025-07-15 17:01:42
发布2025-07-15 17:01:42
10200
代码可运行
举报
运行总次数:0
代码可运行

24: only buildscript {}, pluginManagement {} and other plugins {} script blocks are allowed before plugins {} blocks, no other statements are allowed

代码语言:javascript
代码运行次数:0
运行
复制
plugins {
    id 'com.android.application' version '7.4.1' apply false
    id 'com.android.library' version '7.4.1' apply false
}
apply from: 'config.gradle'
buildscript {
    ext.objectboxVersion = "2.9.1" // objectbox版本

    repositories {
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url "https://repo.eclipse.org/content/repositories/paho-releases/"}
        maven { url 'https://artifact.bytedance.com/repository/Volcengine/' }
        google()
        jcenter()
    }

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
    }
}

删除plugins {

} 之间的内容即可!

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档