解决MacM1芯片无法下载aarch架构grpc的方法

在用自己电脑编译运行公司项目的时候,发现里面编译后发现缺少了这些东西

  • What went wrong: Execution failed for task ':OverseaEngine:generateDebugProto'.

Could not resolve all files for configuration ':OverseaEngine:protobufToolsLocator_grpc'. Could not find protoc-gen-grpc-java-1.4.0-osx-aarch_64.exe (io.grpc:protoc-gen-grpc-java:1.4.0). Searched in the following locations: https://nexus.txzing.com/repository/maven-public/io/grpc/protoc-gen-grpc-java/1.4.0/protoc-gen-grpc-java-1.4.0-osx-aarch_64.exe


  • What went wrong: Execution failed for task ':TXZLongConnection:generateDebugProto'.

Could not resolve all files for configuration ':TXZLongConnection:protobufToolsLocator_javalite'. Could not find protoc-gen-javalite-3.0.0-osx-aarch_64.exe (com.google.protobuf:protoc-gen-javalite:3.0.0). Searched in the following locations: https://nexus.txzing.com/repository/maven-public/com/google/protobuf/protoc-gen-javalite/3.0.0/protoc-gen-javalite-3.0.0-osx-aarch_64.exe

意思大概是我的电脑需要使用aarch架构的文件,但是公司的Maven库里只有x86-74,所以是打不开的 这里需要强制设置下载的文件是x86架构,只需要在对应报错的类的依赖后面加上

复制代码
  protoc {
    artifact = 'com.google.protobuf:protoc:3.14.0:osx-x86_64'
  }
}
//另外还需要在gradle.properites里加上 
protoc_platform=osx-x86_64
//编译后即可解决

但是还是没办法运行编译模块,发现里面已经没有依赖Javafx了,之前是有集成在JDK里的,但是后来从openJdk中分离开了,因为时间紧迫没有再去解决,后续再研究。

不过一般到这里问题就解决了,JavaFx这个只是我的额外问题

封面源自影视飓风,希望自己也能无限进步

相关推荐
xzkyd outpaper22 分钟前
Android中PID与UID的区别和联系
android·计算机八股
Developings23 分钟前
Android logcat命令汇总
android
吃着火锅x唱着歌37 分钟前
PHP7内核剖析 学习笔记 第八章 命名空间
android·笔记·学习
计算机毕设定制辅导-无忧学长1 小时前
微服务架构中的 RabbitMQ:异步通信与服务解耦(二)
微服务·架构·rabbitmq
君的名字2 小时前
怎么判断一个Android APP使用了React Native 这个跨端框架
android·react native·react.js
伊织code2 小时前
macOS 安装 PostgreSQL
数据库·macos·postgresql·gui·安装·客户端·psql
云攀登者-望正茂2 小时前
如何在Mac 上使用Python Matplotlib
python·macos·matplotlib
一米阳光zw2 小时前
mac将自己网络暴露到公网
网络·macos·php
Ultipa2 小时前
云计算与大数据进阶 | 27、存储系统如何突破容量天花板?可扩展架构的核心技术与实践—— 分布式、弹性扩展、高可用的底层逻辑(上)
大数据·架构·云计算
君的名字2 小时前
怎么判断一个Android APP使用了Electron 这个跨端框架
android·javascript·electron