Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle warning during export to Android (Gradle version too old for compileSdk 33) #87072

Closed
SnailRabbids opened this issue Jan 11, 2024 · 7 comments · Fixed by #87346
Closed

Comments

@SnailRabbids
Copy link

Tested versions

v3.5.3.stable.official [6c81413]

System information

Windows 10 Godot

Issue description

I got next warning during export to Android with Godot 3.5.3:
"WARNING: We recommend using a newer Android Gradle plugin to use compileSdk = 33
This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32
..."

  1. I've tried to delete and reinstall export template. Didn't help.
  2. "platformer\android\build\gradle\wrapper\gradle-wrapper.properties" contains "distributionUrl=https://services.gradle.org/distributions/gradle-7.4.2-bin.zip"

Steps to reproduce

Start emulator
Start Godot 3.5.3.stable
import app from "Minimal reproduction project"
click on "Debug" in left top corner and select "Deploy with Remote debug"
Project -> install Build template
Editor -> Export -> Android -> set SDK path and Keystore, enable "Use custom Build", export Format AAB
Export Project... -> Export with debug is enabled -> Save

Minimal reproduction project (MRP)

https://github.com/godotengine/godot-demo-projects/tree/3.5/3d/platformer

@akien-mga akien-mga changed the title Gradle warning during export to Android Gradle warning during export to Android (Gradle version too old for compileSdk 33) Jan 11, 2024
@akien-mga
Copy link
Member

In practice this warning seems to be harmless, but I agree we need to figure out how to remove it as it's confusing to users.

We can either:

  • Silence the warning (there's a gradle option for that)
  • Upgrade the Android Gradle plugin

We'll probably need to start thinking about when we should target compileSdk 34, and this will also imply updating the Android Gradle plugin.

CC @m4gr3d

@SnailRabbids
Copy link
Author

@akien-mga
does Godot 3.5.3 really uses an outdated version of Gradle?
In this case, what does next line means: "distributionUrl=https://services.gradle.org/distributions/gradle-7.4.2-bin.zip" ?

@SnailRabbids
Copy link
Author

@akien-mga
and the most important question. Can I just ignore this warning?

@akien-mga
Copy link
Member

Godot doesn't use an outdated version of Gradle, just a slightly older one than the one recommended for compileSdk 33 (we still use the one recommended for compileSdk 32).

You can ignore this warning.

@SnailRabbids
Copy link
Author

SnailRabbids commented Jan 11, 2024

@akien-mga I've tried with one more project, this time bigger one. But gradle output didn't even shown. I mean, the window "Building Android Project (gradle)" didn't shown.

Is this a bug? How could I enable these logs?

@tokengamedev
Copy link

I have tested with compileSdk=34 in 3.5.3 and it works. Changed in the import settings, not touched the config.gradle. Logs throws up warnings but can be ignored.

Also testing Plugin built with Gradle 8.5 with AGP 8.2.0 and Java (17). It has been working till date without issues. And it works with 3.5.3. Not tested in 4.1.1 and 4.2.1 yet.

Migrating from Gradle 7.4.2 to 8.5 for plugin had some hiccups but doable. There will be changes to scripts as some features are deprecated and some removed (deprecated earlier).
It can be done for Godot.

@SnailRabbids
Copy link
Author

I have tested with compileSdk=34 in 3.5.3 and it works. Changed in the import settings, not touched the config.gradle. Logs throws up warnings but can be ignored.

Also testing Plugin built with Gradle 8.5 with AGP 8.2.0 and Java (17). It has been working till date without issues. And it works with 3.5.3. Not tested in 4.1.1 and 4.2.1 yet.

Migrating from Gradle 7.4.2 to 8.5 for plugin had some hiccups but doable. There will be changes to scripts as some features are deprecated and some removed (deprecated earlier). It can be done for Godot.

"Changed in the import settings" ? Do you mean in "Android export" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants