rokid-skill-sample如何编译、调试


(JeffJi) #1

那个rokid-skill-sample如何编译,如何跟我的开发者账号先关联起来?有说明吗?


(chao.xuc) #2

你好,这个帖子应该发在「技能开发工具」版块,已经帮你调整过来了。

关于skill-sample,分为两个部分,分别对应Rokid开放平台技能开发工具中的相关部分,其中

  • sample中「voice-interaction」的两个文件内容请复制进「语音交互」的对应部分。
  • sample中的「sample-java」的源代码需要部署在自己的服务器中,然后将您服务器的URL贴入「配置」的https文本框中。

具体可以查看技能开发示例代码中对应的文档。

谢谢。


(JeffJi) #3

maven编译这里要设置些什么?


(hang.bao) #4

不需要设置什么,是一个最简单的maven工程,你安装一个Eclipse for J2ee版本的ide,然后下载一个7.0以上的Tomcat就可以了,当然系统端的Java环境还是需要搭建的,我这边用JDK7.0,测试过7.0以上的JDK都可以跑的。项目里面没有用到数据库,所以数据库可以不需要安装,如果有什么问题可以在论坛上把错误日志提交上来。


(hang.bao) #5

你需要有一台公网能够访问的服务器,然后编译一下simple工程,生成war包,部署到你的服务器上面,然后在你的开放平台上面创建一个应用,里面的url指向你部署好的工程接口地址,这样就关联好了


(JeffJi) #6

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException


(hang.bao) #7

eclipse安装的maven插件是m2eclipse,在控制台使用命令mvn compile并未报错。后在pom.xml文件标签里面加 上compile即可。


(hang.bao) #8

pom.xml文件标签后面加上compile即可


(JeffJi) #9

goals 里面加了compile是可以编译通过的。
顺便说下,不知道你们有没有碰到工程里提示Gson找不到,改pom里<gson_version>2.7</gson_version> 是可以的,用2.8.0 Eclipse里就报错,jar里的class也打不开报invalid LOC header (bad signature)


(hang.bao) #10

可能是2.8没有放在maven库里面


(guoxindi) #11

Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/spring-test/4.3.10.RELEASE/spring-test-4.3.10.RELEASE.jar (600 kB at 77 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2017-12-11T16:59:12+08:00
[INFO] Final Memory: 16M/90M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project guessnumber: Could not resolve dependencies for project io.xys.skill:guessnumber:jar:0.0.1-SNAPSHOT: Could not find artifact com.rokid.skill:rokid-skill-spring-boot-starter:jar:0.0.3.BETA-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
执行rokid-skill-sample中的guestnumber生成可执行jar包时报错


(阿莫斯疙瘩) #12

我也是报这个错,你解决了嘛