Project doesn't build with gpg on android with build tools 28 / gradle 4.6
SimonIT opened this issue · 18 comments
Recently I upgraded my Gradle version to 4.6 from 3.5.1.
But this annoying error appears:
Android resource linking failed
Output: D:\Software\Entwicklung\TurbanGuy\android\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:423: error: resource android:attr/preserveIconSpacing is private.
error: failed linking references.
Command: C:\Users\simon\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\51876d9a334f74c9c5f25b354472a28b\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
D:\Android-SDK\platforms\android-28\android.jar\
--manifest\
D:\Software\Entwicklung\TurbanGuy\android\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Software\Entwicklung\TurbanGuy\android\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@D:\Software\Entwicklung\TurbanGuy\android\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Software\Entwicklung\TurbanGuy\android\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
de.nta15.turbanguy.android\
-0\
apk\
--output-text-symbols\
D:\Software\Entwicklung\TurbanGuy\android\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
I found the source in gamesvcs-android-gpgs
.
Because if I comment the line compile "de.golfgl.gdxgamesvcs:gdx-gamesvcs-android-gpgs:$gamesvcsVersion"
in my project, I can build it.
I use libgdx 1.9.8 and gdx-gamesvcs 0.2.3.
Hi, you are building your libGDX game with Gradle 4.6? AFAIK and according to the issue tracker, Gradle >= 4 is not supported.
I know. But if I generate a new project with the setup application, the project comes with Gradle 4.6🤷🏾♂️
So I thought it would run and it does, but only without this extension. So I think it's a problem with this extension and not with libgdx.
What is your compileSdkVersion
and buildToolsVersion
?
buildToolsVersion "28.0.3"
compileSdkVersion 28
I tested with 27, but it failed too
any progress? If you need more information, just ask
I asked here if Gradle 4.6 is now officially supported. No answer. I don't know if the changed setup tool template was done accidently or by intention, therefore I stay on the older Gradle version with my projects and would recommend you also to do so with 1.9.8.
When 1.9.9 is released with official Gradle 4.6 support, I will adopt the necessary changes.
LibGDX 1.9.9 is released and the linked issue of you is closed. I think it's the sign that Gradle 4.6 is officially supported
Interesting, the release was created yesterday. But there is still no official announcement.
Do you think there will be any official announcement? The last one was at version 1.5.1 (based on the CHANGES file) with Gradle 2.2 which was for 4 years.
I would expect it here: https://www.badlogicgames.com/wordpress/ bundled with some notes if there are any changes necessary when upgrading existing projects.
I gave this a shot today. The problem is indeed caused by build tools 28.0.2 interphering with GPGS services lib 8.4 and has nothing to do with Gradle. But with Gradle 4.6, it is not possible to use an older build tools version (setting to 27 is overriden which is stated when you sync the project).
Unfortunately, using GPGS services 11.4.2 does not help either. This was the last compatible version before the major change.
What's the minimum version that can be used? 12? What is against using this version?
Found out the problem was not caused by GPGS, but by support and G+ libs that were included. I've included them because this was done in Google's example project, but it seems they are not necessary. Without them, everything works. I updated to 11.4.2 anyway and check. You'll get a running version soon.
Change to 0.2.4-SNAPSHOT, should work for you now. It builds and works against this project
great! Thank you very much
I want to publish a new release with this change. Does it work for you now?
Yes, it works
Great to hear. I close this issue now and publish a release in the next days.
Thanks for putting me on this.