报这个错误的
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_blue:generateDebugProto'.
> Could not resolve all files for configuration ':flutter_blue:protobufToolsLocator_protoc'.
> Could not find protoc-3.11.4-osx-aarch_64.exe (com.google.protobuf:protoc:3.11.4).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.11.4/protoc-3.11.4-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 2s
以下是解决方法
打开图中build.grade里面修改如下代码
图中注释的代码换成以下
protobuf {
protoc {
// artifact = 'com.google.protobuf:protoc:3.11.4'
artifact = 'com.google.protobuf:protoc:3.17.3'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
}
}
}
dependencies {
// implementation 'com.google.protobuf:protobuf-javalite:3.11.4'
implementation 'com.google.protobuf:protobuf-javalite:3.17.3'
}
我通过这样的修改方法,可以编译过去flutter_blue: ^0.8.0这个插件
原文链接:自己进去看看