-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Please ensure you have given all the following requested information in your report.
Issue details
I have a project with mostly Java source, but some Kotlin sources. Kotlin source files in the app module itself appear to work ok, but if I have Kotlin sources in a library module, they are not compiled when the app is built through Android Studio, but are compiled if I use gradlew from the command line to build and launch the app. The symptom is that at run time the app fails with "ClassNotFoundException" when trying to load a class generated from the Kotlin source.
Examining the log of the build process shows that when built from the command line, the Kotlin class files in question are compiled by Robovm, but not when built from AS.
If the generated class files are copied from the folder .../build/classes/kotlin/main/... to .../build/classes/java/main/... in the library module and the compilation re-run, then compiling with AS does show those classes as being compiled, and the app works.
So it appears that the compilation process performed by the AS Robovm plugin is not scanning the build/classes/kotlin folder in a library module (though it does in the app module.)
Reproduction steps/code
Create an iOS project with an app module, and a library module. Create a Kotlin source file in the library module and use it in the app. Run the app from Android Studio (simulator or device)
Configuration
Android Studio 2.0.1 on MacOS 10.13.1.
Build Tools:
- IDEA plugin - 2.3.3 or 2.3.4-SNAPSHOT
- Eclipse plugin
- Gradle plugin - 2.3.3 or 2.3.4-SNAPSHOT
Versions:
Please provide the version of RoboVM, XCode and JDK used
- Robovm: 2.3.3 or 2.3.4-SNAPSHOT
- XCode: 9.2
- JDK: 1.8
Build Targets:
IPadSimulator (x86_64) and iPad (32 bit)
Stacktrace
java.lang.NoClassDefFoundError:
com/controlj/ios/framework/FoundationLogger at
com.controlj.ios.framework.IosApp.didFinishLaunching(IosApp.java:48) at
com.controlj.ios.bluemax.BlueMAXiOSApp.didFinishLaunching(BlueMAXiOSApp.java:35) at
com.controlj.ios.framework.IosApp.$cb$application$didFinishLaunchingWithOptions$(IosApp.java) at
org.robovm.apple.uikit.UIApplication.main(Native Method) at
org.robovm.apple.uikit.UIApplication.main(UIApplication.java:428) at
com.controlj.ios.bluemax.BlueMAXiOSApp.main(BlueMAXiOSApp.java:78)
--