-
Notifications
You must be signed in to change notification settings - Fork 355
Closed
Labels
AndroidAndroid-specific ticketAndroid-specific ticket
Description
Describe the bug
There is an issue of protobuf that it does not get the correct artifact name, which cause the plugin does not build to Android on Apple silicon M1
To Reproduce
- Add package to the project.
- Build & Run on Android.
- You would see
* What went wrong:
Execution failed for task ':reactive_ble_mobile:generateDebugProto'.
> Could not resolve all files for configuration ':reactive_ble_mobile:protobufToolsLocator_protoc'.
> Could not find protoc-3.13.0-osx-aarch_64.exe (com.google.protobuf:protoc:3.13.0).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.13.0/protoc-3.13.0-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 6s
Exception: Gradle task assembleDebug failed with exit code 1
Expected behavior
it builds
Smartphone / tablet
- Device: Pixel2
- OS: Android 10
- Package version: 3.3.1+1, 4.0.0, 4.0.1
Peripheral device
Additional context
Please made the following changes to the gradle file.
protobuf {
protoc {
// a fix for m1
if (osdetector.os == "osx") {
artifact = 'com.google.protobuf:protoc:3.13.0:osx-x86_64'
} else {
artifact = 'com.google.protobuf:protoc:3.13.0'
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
}
}
}
Metadata
Metadata
Assignees
Labels
AndroidAndroid-specific ticketAndroid-specific ticket