I'm trying to use Protobuf in my Android application. So to do that, I added the following lines in my gradle.build file :
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.5.0"
}
}
apply plugin: "com.google.protobuf"
sourceSets {
main {
proto {
// In addition to the default 'src/main/proto'
srcDir '../../../Libs/Protocol'
}
}
}
protobuf {
protoc {
path = '/usr/local/bin/protoc'
}
}
The thing is I get an error when gradle builds. It says that :
Error:Execution failed for task ':app:generateDebugProto'.
> protoc: stdout: . stderr: protoc-gen-javanano: program not found or is not executable
--javanano_out: protoc-gen-javanano: Plugin failed with status code 1.
Can you help me with this issue ? I have no idea of how to fix it.
Thank you in advance !