Execution failed for task ':app:generateDebugProto'. : com.google.protobuf\protoc\3.18.0

723 views
Skip to first unread message

amir saim

unread,
Mar 29, 2023, 3:56:32 AM3/29/23
to Protocol Buffers
java.io.IOException: Cannot run program "C:\Users\user\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protoc\3.18.0\61d7f5d8849eb1c9b86ff07ca3f6172ce904ed4\protoc-3.18.0-osx-x86_64.exe": CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher


How to fix this issue in Android studio latest version

Android Studio Electric Eel | 2022.1.1 Patch 2

Android Gradle Plugin Version : 4.1.1

Gradle Version : 6.5

Operating System: Window 10

Scott Beeker

unread,
Apr 9, 2023, 3:45:35 PM4/9/23
to Protocol Buffers
Make sure that the path to the binary file does not contain any spaces or special characters. You can put the binary file in a directory that does not contain spaces or special characters, like C:\Protoc

The error message indicates that you are trying to run a binary file that is not compatible with the version of Windows you are running. In this case, it looks like you are trying to run a version of the protoc binary for Mac OS X on a Windows machine.

To resolve the issue, you will need to download and use the correct version of the protoc binary for your operating system. You can download the binaries from the Protocol Buffers GitHub page (https://github.com/protocolbuffers/protobuf/releases).

Make sure to select the binary that matches your operating system architecture (32 or 64-bit) as well as the correct platform (Windows, Mac, or Linux). Once you have the correct binary downloaded, update your program to use the new binary file path.

Reply all
Reply to author
Forward
0 new messages