小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
FastDDS环境搭建的时候报错
-
前面的都按照步骤顺利完成,但是当我第一次执行第三步的时候
3.编译
colcon build
cd src/fastddsgen/ && gradle assemble
的时候提示我缺少gradle,于是我 get-apt install gradle 了,
然后再执行 gradle assemble 就出现下面的错误(base) yz@yz-computer:~/fastdds_ws/src/fastddsgen$ gradle assemble FAILURE: Build failed with an exception. * Where: Build file '/home/yz/fastdds_ws/src/fastddsgen/build.gradle' line: 23 * What went wrong: Could not compile build file '/home/yz/fastdds_ws/src/fastddsgen/build.gradle'. > startup failed: build file '/home/yz/fastdds_ws/src/fastddsgen/build.gradle': 23: unable to resolve class org.gradle.api.tasks.options.Option @ line 23, column 1. import org.gradle.api.tasks.options.Option; ^ 1 error * 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 0s
-
@yanghong2000719 conda 保持退出 ,重新尝试
-
@yanghong2000719 需执行后一步添加gradle环境
echo 'export PATH=$PATH:xxx/fastdds_ws/gradle-6.4/bin/' >> ~/.bashrc
后再
source ~/.bashrc -
这个问题解决了吗?我照上面的方法都试过了,还是报上面的错误:
FAILURE: Build failed with an exception.
-
Where:
Build file '/home/d2lros2/chapt3/fastdds_ws/src/fastddsgen/build.gradle' line: 23 -
What went wrong:
Could not compile build file '/home/d2lros2/chapt3/fastdds_ws/src/fastddsgen/build.gradle'.
startup failed:
build file '/home/d2lros2/chapt3/fastdds_ws/src/fastddsgen/build.gradle': 23: unable to resolve class org.gradle.api.tasks.options.Option
@ line 23, column 1.
import org.gradle.api.tasks.options.Option;
^1 error
-
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 0s
-