Skip to content Skip to sidebar Skip to footer

Groovy In Android - Launcher Activity Cant Be Found

i'm trying to run a simple android program. The issue is the launcher activity is a groovy file, it's called MainActivity.groovy and it resides in the java source folder. Here is

Solution 1:

In your code you have many problems:

  • Groovy files should be under groovy folder, not java
  • Android does not support groovy as a native language, just java, so you need to pre-compile the groovy files in order to let the Dalvik/ART execute it. The way to do so is applying a plugin in the build.gradle that does this work for you.

This is a great tutorial for the plugin on github.

Post a Comment for "Groovy In Android - Launcher Activity Cant Be Found"