Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':app:generateDebugProto'. > protoc: stdout: . stderr: Missing output directives. #705

Open
MontreaI opened this issue May 12, 2023 · 1 comment

Comments

@MontreaI
Copy link

MontreaI commented May 12, 2023

It looks like I am receiving this error:

Execution failed for task ':app:generateDebugProto'.
> protoc: stdout: . stderr: Missing output directives.

I believe I have correctly configured both my project and app level gradles:

project gradle

buildscript {
    dependencies {
        classpath "com.google.protobuf:protobuf-gradle-plugin:$proto_version"
     }
}

plugins {
    id 'org.jetbrains.kotlinx.kover' version "$kover_version"
    id "com.google.protobuf" version "$proto_version" apply false
}

app gradle

apply plugin: 'com.google.protobuf'
apply plugin: 'com.android.application'

protobuf {
    protoc {
        artifact = 'com.google.protobuf:protoc:3.21.12'
    }
    plugins {
        javalite {
            artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
        }
    }
    generateProtoTasks {
        ofSourceSet("main").forEach { task ->
            task.builtins {
                getByName("java") {
                    option("lite")
                }
                getByName("kotlin") {
                    option("lite")
                }
            }
            task.plugins {
                javalite { }
            }
        }
    }
}

dependencies {
    implementation 'com.google.protobuf:protobuf-javalite:3.23.0'
    implementation 'com.google.protobuf:protobuf-kotlin-lite:3.23.0'
}

@ktKongTong
Copy link

same error.
This issue comment helped me solve the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants