java - 将 JDA discord bot 上传到 heroku
问题描述
嗨,我正在尝试将我的 JDA discord 机器人上传到 heroku,但是当我尝试将其推送到 heroku 时,我收到了这个错误:
remote: [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
remote: [INFO] Compiling 20 source files to /tmp/build_b5079e7584c21a569003e4d9347d90d0/target/classes
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] COMPILATION ERROR :
remote: [INFO] -------------------------------------------------------------
remote: [ERROR] /tmp/build_b5079e7584c21a569003e4d9347d90d0/src/net/OFFWORLDMC/Musik/MusikController.java:[18,39] cannot find symbol
remote: symbol: variable volume
remote: location: class net.OFFWORLDMC.Musik.MusikController
remote: [INFO] 1 error
remote: [INFO] -------------------------------------------------------------
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 31.677 s
remote: [INFO] Finished at: 2020-06-08T20:07:06Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project OffWorldMc: Compilation failure
remote: [ERROR] /tmp/build_b5079e7584c21a569003e4d9347d90d0/src/net/OFFWORLDMC/Musik/MusikController.java:[18,39] cannot find symbol
remote: [ERROR] symbol: variable volume
remote: [ERROR] location: class net.OFFWORLDMC.Musik.MusikController
remote: [ERROR] -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
remote:
remote: ! ERROR: Failed to build app with Maven
remote: We're sorry this build is failing! If you can't find the issue in application code,
remote: please submit a ticket so we can help: https://help.heroku.com/
remote:
remote: ! Push rejected, failed to compile Java app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to offworldmc.
remote:
To https://git.heroku.com/offworldmc.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/offworldmc.git'
我没有在我的目录中创建任何新文件请帮助我感谢每个答案
解决方案
MusikController.java:[18,39] cannot find symbol
,MusikController.java的第18行有一个符号找不到。
可能的修复:[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
正如消息所说,构建依赖于平台。这可能在您的 PC 上有效,但无法使用默认平台编码 UTF-8 来读取我之前在服务器上提到的特定符号。
推荐阅读
- excel - 如何将字符串中的每个单词与 Exel 中的整列进行比较?
- java - 如何将值从@ApplicationScoped 传递给@ViewScoped?
- google-compute-engine - 模块创建的所有实例的列表
- python - 制作一个操作整数的函数
- encryption - 使用 HTTPS 时可以加密服务器端吗?
- netbeans - 将 JavaCard 3.0.4 添加到 Netbeans 8.2 作为新的 JC 平台
- python - 打印列表项及其 X 后续项
- android - 将 cordova android 平台更新到比 6.2.3 更新的版本后,Android 上的字体太大
- javascript - 事件绑定上的数据重新加载angularjs
- php - 来自服务器端的数据不显示