google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.77k stars 273 forks source link

"Could not find protoc-osx-aarch_64.exe" on Apple M2 #679

Closed hieunguyen-lxp closed 1 year ago

hieunguyen-lxp commented 1 year ago

Hello, I'm using "protobuf-gradle-plugin/examples/exampleProject" at tag v0.9.2.

I get this error.

nhieu@hieunguyen exampleProject % ./gradlew build 

Welcome to Gradle 5.6.4!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

> Task :extractIncludeProto
> Task :extractProto
> Task :generateProto FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateProto'.
> Could not resolve all files for configuration ':protobufToolsLocator_protoc'.
   > Could not find protoc-osx-aarch_64.exe (com.google.protobuf:protoc:3.6.1).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.6.1/protoc-3.6.1-osx-aarch_64.exe

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 726ms
3 actionable tasks: 3 executed

Apple M2 MacOS Ventura

Any idea how to fix it?