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

僤鯓⒐⒋嵵緔 提交于 2019-11-29 22:46:14

问题


I'm using the new gradle build switch when sending an Android build for Codename One. One of the highlighted benefits of building with gradle is the ability to open/run in Android Studio and indeed the project opens for me but I'm getting the following error:

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.

I restarted the process, the IDE and did quite a few things with no real success.


回答1:


I had the exact same issue and corresponded with Codename One support a while back and it turns out the solution is rather simple:

Define your own installation of gradle as the one to use, this is what Chen from CodenameOne sent to me as a reference:

I installed gradle 2.8 and configured it as such in the settings and that almost worked. I also had to follow the instructions of 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 despite the fact that multi-sex was not necessary in the server?



来源:https://stackoverflow.com/questions/34430404/how-to-build-the-native-android-sources-from-codename-ones-build-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!