Hi guys,

i am using godot 3.5.2 and trying to export to android, but it isnt working. I am getting the following error:

FAILURE:

Build failed with an exception.

  • Where:

Build file 'D:\GODOT\Calculator\android\build\build.gradle' line: 25

  • What went wrong:

An exception occurred applying plugin request [id: 'com.android.application', version: '7.2.1']

Failed to apply plugin 'com.android.internal.application'.

Could not create plugin of type 'AppPlugin'.

Could not generate a decorated class for type AppPlugin.

com/android/build/api/dsl/Publishing

  • Try:

Run with --stacktrace option to get the stack trace.

Run with --info or --debug option to get more log output.

Run with --scan to get full insights.

BUILD FAILED in 1s

I dont know what to do. I am using the latest Android Studio version (I updated it to latest). Maybe someone can help. Thanks in advance.

General advice: Make sure you follow the documentation to the letter. Make sure your ndk and java are the correct versions, and run godot from your command line so you see all the error messages. You might rename your gradle directory and let godot download it again, as well.

    duane How to let godot download gradle? Can I delete gradle and it downloads it?

      I'm using the latest Android Studio too. I keep it up to date. I use the Android SDK that it provides for Godot, and exporting to Android works for me in both Godot 3 and Godot 4.

      Are you using the default export template, or a custom one?

      csk2004

      In linux, if you rename the ".gradle" directory to "back.gradle" or some such, godot will download the appropriate version of gradle again.