Ionic- Google Map - Angular

Hello I Get an error on build with IONIC and Google Map plugins
I create an ionic app with angular but the build failed with an error like

````× Running Gradle build - failed!
        FAILURE: Build failed with an exception.
        * Where:
        Build \android\app\build.gradle' line: 29
        * What went wrong:
        A problem occurred evaluating project ':app'.
> Could not find method kotlinOptions() for arguments
        [build_1wbpd469314zcskjuyhp10wri$_run_closure1$_closure7@eb302fc] on extension 'android' of type```

At the line 29 of the file i just have

jvmTarget = "1.8"

And the compilation works well without the google Map plugin

If you think the Google Map plugin breaks your build, you should probably report that to their bug tracker, not to a Gradle community forum. :wink:

Regarding the actual error, I highly recommend switching to Kotlin DSL. By now it is the default DSL, you immediately get type-safe build scripts, actually helpful error messages if you mess up the syntax, and amazingly better IDE support when using a good IDE like IntelliJ IDEA or Android Studio.

The “actually helpful error messages” for example is what you hit here. With Groovy DSL you often have such non-saying errors that mean “something within the kotlinOption { ... } block is wrong” without further information what exactly and you can just trial-and-error to find the problem.

As in your case there is only one line I would have guessed it is simple to find the problem, but if you say it is only with the Google Maps plugin, this sounds really strange. And I don’t think anyone can guess what is happening without you providing an MCVE.