AndroidStudio3: using RoboVM/gradle project with a crutch15 Jan 2018 | dirty hack idea-plugin gradle
There is old living bug that RoboVM doesn’t work nice in Android Studio 3.0 And it still doesn’t work nice, here few workarounds that will allow to start project.
With PR253 there is a menu that allows to bring “create new project” dialog back.
Also same PR253 fixes crashes that appeared during gradle project importing due different
ProjectDataManagerare used in
Android Studio 3(last one is used deprecated and recent class is not present in AS3)
There is an epic bug discovered in Idea/AS which costed me half of the day. The bug itself says that “gradle version is unsupported”, the workaround would be a try to use different (but supported) version (or file manipulation but I will not cover it here as not realible). Check link for details;
Once gradle project is being imported and “gradle version is unsupported” message appear either try different version of gradle or hit ok and AS will add gradle wrapper to project
- Most likely during import following error will be received. It should be ignored for now as Android Studio forces ‘android-gradle’ builder even for pure “gradle-java” project. It is not clear for now how to fight it.
Unsupported Modules Detected: Compilation is not supported for following modules: robo. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.
- if project doesn’t compile with error message:
[ERROR] Couldn't compile app org.robovm.compiler.CompilerException: Main class com.mycompany.myapp.Main not found
- open gradle panel;
- re-import gradle project;
- open module settings and remove
android-gradleand keep only
- if gradle project is refreshed – remove
- instead of 6. it is possible just trigger project build from
Android Studioalready have different code base, this makes hard to support;
RoboVM Ideaplugin is quite old and requires refactoring especially gradle import part, possible this will fix issues in AS.
- Unpleasant thing here is that it is not possible to debug plugin in Android Studio, this makes process time consuming and difficult.
- for now use
Intellij Ideaif possible