gpt4 book ai didi

android - 错误:无法为根项目获取未知属性 'plugin'

转载 作者:行者123 更新时间:2023-12-03 05:19:10 25 4
gpt4 key购买 nike

我正在尝试构建LineageOS的投石机启动器。更新protobuf插件后,我设法摆脱了一些错误。但是经过几次尝试,我无法处理此错误:

Could not get unknown property 'plugin' for root project'android_packages_apps_Trebuchet-lineage-16.0' of typeorg.gradle.api.Project.


这是我第一次从Github编辑代码。请帮忙。
buildscript {

repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13'
}
}
apply plugin 'com.android.application'
apply plugin 'com.google.protobuf' version '0.8.13'


final String SUPPORT_LIBS_VERSION = '28.0.0'


android {

defaultConfig {
compileSdkVersion 28
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {
minifyEnabled false
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
此后还有很多代码,它们似乎并不重要,因此没有添加。让我知道是否需要

最佳答案

它应该是:

apply plugin: 'com.android.application'
用冒号。

关于android - 错误:无法为根项目获取未知属性 'plugin',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64497141/

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