Closed mgrigajtis closed 2 years ago
Related to https://github.com/godotengine/godot/pull/66935 which changed the name of the debug AAR lib (.debug.aar
-> .template_debug.aar
). I noticed this too while building beta 3 yesterday, I'm not sure this was a necessary change, and it likely breaks compat for existing plugins. @m4gr3d
That would indeed explain it and that would totally suck, because we can now either choose between working plugins in beta 2, or working plugins in master, not both... :)
Once this change is in a beta build we'll update the name in the plugin.
@m4gr3d btw, does this also mean that we have a problem if we mix a debug build of the plugin with a runtime and vise versa seeing the name of the library it expects will be different? Thats probably an existing issue atm even with the old names... Or am I missing something?
For the record, I have built 4.0-beta3 and I'm about to release it, which includes #66935.
So plugins will likely need to be changed for beta3+ indeed. And if we decide to go back to the old name in beta4 then we'll have to change again. But well it's beta and early days for most Android plugins for Godot 4.0 so it's probably not too big a deal.
Is there anything I have to do to get it to build locally, or will it be fixed in the master branch soon?
@mgrigajtis if I understand the problem correctly it's just a matter of adjusting the godot-lib
entry here: https://github.com/GodotVR/godot_openxr_loaders/blob/master/godotopenxrmeta/build.gradle#L42
Well I tried this and it didn't fix the problem for me so there is more to this....
Also @akien-mga , we only put the release build of the lib as part of our releases. As a result I'm currently just including the release build of the godot-lib (I was before in beta2 as well and that worked). The AAR plugin system currently doesn't even allow identifying release builds and debug builds so I'm not even sure how this is supposed to work.
So yeah I'm a bit stumped as to what the correct fix it.
Anyway, the change I'm currently working on is: https://github.com/GodotVR/godot_openxr_loaders/pull/12
@mgrigajtis @BastiaanOlij @akien-mga I was able to reproduce the issue locally. The cause of this bug was that the Godot source was updated without cleaning the workspace, so that it contained the previously built Android libraries with the old target names (which, I suppose, is included in the apk through an include: ['*.aar']
). To make exporting to Android work, make sure that the source folder is clean before building Godot, and that the Android build templates are reimported into the project.
owh thats nuts! that hasn't bit me in the **** for a while...
@konczg actually, my source folder is clean, if by the source folder you mean res://android/build
. It was duplicated in my android_source.zip.
Running gradlew clean
in platform/android/java
doesn't seem to do a full job cleaning stuff up, I had to go manually into the build folders to clean up the old AARs so there is some room for improvement there.
@BastiaanOlij Yeah, the aar's in question seemed to be under platform/android/java
. Sorry, by "cleaning" I meant a full git clean -xdf
, that seemed to do the job for me :) (but always make sure first that there is no untracked change that needs to be kept)
I'm very careful running git clean -xdf
because it blows away my VSCODE setup :(
Closing this issue as resolved.
Godot version
4.0 master branch
System information
Windows 11, NVIDIA 3060, Vulkan Mobile
Issue description
When attempting to export (or run) for Oculus Quest 2, the build fails when checking for duplicate classes. Oddly enough, the official beta release 2 still works.
Output below:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 32
This Android Gradle plugin (7.0.3) was tested up to compileSdk = 31
This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=32 to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to use a newer Android Gradle Plugin that has been tested with compileSdk = 32
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':checkDebugDuplicateClasses'.
Go to the documentation to learn how to Fix dependency resolution errors.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 16s 18 actionable tasks: 16 executed, 2 up-to-date
Exit Code: 1
Steps to reproduce
Clone the Godot 4 Open XR example project (https://github.com/BastiaanOlij/godot4_openxr_demo), configure for Oculus Quest 2, attempt to export or run.
Minimal reproduction project
https://github.com/BastiaanOlij/godot4_openxr_demo