mavenCentral()
和
classpath ‘com.google.protobuf:protobuf-gradle-plugin:0.8.8’
完整的配置:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.4.0’
classpath ‘com.google.protobuf:protobuf-gradle-plugin:0.8.8’
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
在app的build.gradle里面,需要配置:
apply plugin: ‘com.google.protobuf’
和
implementation ‘com