如何从 Codename One 的构建服务器构建本机 Android 源代码

How to build the native Android sources from Codename One's build server

我在为代号一发送 Android 构建时使用新的 gradle build switch。使用 gradle 进行构建的突出好处之一是能够在 Android Studio 中 open/run 并且确实为我打开了该项目,但我收到以下错误:

Error:Unable to load class 'org.codehaus.groovy.runtime.StringGroovyMethods'. Possible causes for this unexpected error include:

  • Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
  • The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
  • Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

我重新启动了进程 IDE 并做了很多事情但没有真正成功。

我遇到了完全相同的问题,前段时间与 Codename One 支持人员联系,结果证明解决方案相当简单:

定义你自己安装的gradle作为使用,这是CodenameOne的Chen发给我的作为参考:

我安装了 gradle 2.8 并在设置中对其进行了配置,几乎可以正常工作。我还必须按照 Android Studio - supplied javaHome is not a valid folder & even After update of AS to 1.0, getting "method ID not in [0, 0xffff]: 65536" error in project 的说明进行操作,尽管服务器中不需要多性别?