combine .proto in android studio project
compile 'com.google.protobuf:protobuf-java:3.1.0'
compile 'com.google.protobuf:protoc:3.1.0'12
combine .proto in android studio project
compile 'com.google.protobuf:protobuf-java:3.1.0'
compile 'com.google.protobuf:protoc:3.1.0'12
combine .proto in android studio project
apply plugin: 'com.google.protobuf'1
combine .proto in android studio project
protobuf {
//Configure the protoc compiler
protoc {
artifact = 'com.google.protobuf:protoc:3.5.1'
}
//Configure the build directory here, after compilation, the corresponding java file will be generated in the build directory
generateProtoTasks {
all().each { task ->
task.builtins {
remove java
}
task.builtins {
java {}
}
}
}
}1234567891011121314151617
combine .proto in android studio project
sourceSets {
main {
java {
srcDir 'src/main/java'
}
proto {
srcDir 'src/main/proto'
}
}
}12345678910
combine .proto in android studio project
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.2' //The version below 0.8 must be 0.8.0
}
}12345678910
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us