转载自
m1 mac Android protobuf 遇到的问题_Five_51的博客-CSDN博客
记录一下,以前没用过protobuf,找了好久,很头痛
问题是
Could not find protoc-3.6.1-osx-aarch_64.exe (com.google.protobuf:protoc:3.6
主要是两点
app下的build.gradle
protobuf {
protoc {
// for apple m1, please add protoc_platform=osx-x86_64 in $HOME/.gradle/gradle.properties
if (project.hasProperty('protoc_platform')) {
artifact = "com.google.protobuf:protoc:3.13.0:${protoc_platform}"
} else {
artifact = "com.google.protobuf:protoc:3.13.0"
}
}
}
以及gradle.properties中
protoc_platform=osx-x86_64