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

这是我第一次从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'
用冒号。

07-24 09:46
查看更多