google / google/protobuf-gradle-plugin

Android build error

Open
#431 6 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Groovy
Stars
1.8k
Forks
288
PR merge metrics
No merged PRs in 30d

Description

I am facing the below error while building my app:

```
Cause: protoc: stdout: . stderr: google/protobuf/descriptor.proto: File not found.
google/api/annotations.proto:20:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
google/api/annotations.proto:26:8: "google.protobuf.MethodOptions" is not defined.
google/api/annotations.proto:19:1: warning: Import google/api/http.proto but not used.
```

Can you please point me to the solution to this as I am unable to find any.

Gradle dependencies : App - level gradle :

```
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.8.0'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
}
}
}

implementation "io.grpc:grpc-okhttp:1.31.1
implementation "io.grpc:grpc-stub:1.31.1"
implementation 'javax.annotation:javax.annotation-api:1.2'
implementation 'com.google.protobuf:protobuf-javalite:3.12.0'
```

Project - level gradle:

```
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13'
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.