godot-google-play-billing icon indicating copy to clipboard operation
godot-google-play-billing copied to clipboard

Build failed: Failed to transform godot-lib.4.2.stable.template_release.aar

Open blackcan opened this issue 1 year ago • 14 comments

Hi, I followed the README steps but encountered the build failure, here is the error output:

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':godot-google-play-billing:lint'.
> Could not resolve all artifacts for configuration ':godot-google-play-billing:releaseCompileClasspath'.
   > Failed to transform godot-lib.4.2.stable.template_release.aar to match attributes {artifactType=android-manifest}.
      > Execution failed for JetifyTransform: /Users/blackcan/Documents/godot-google-play-billing/godot-google-play-billing/libs/godot-lib.4.2.stable.template_release.aar.
         > Failed to transform '/Users/blackcan/Documents/godot-google-play-billing/godot-google-play-billing/libs/godot-lib.4.2.stable.template_release.aar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 61. (Run with --stacktrace for more details.)
           Please file a bug at http://issuetracker.google.com/issues/new?component=460323.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings

I'm not familiar with Gradle and Android development so don't know how to troubleshoot.

blackcan avatar Dec 05 '23 06:12 blackcan

Try this

kyadalu1 avatar Jan 06 '24 09:01 kyadalu1

followed the readme and just had the same error

cmklu avatar Jan 12 '24 19:01 cmklu

I was able to build and use the plugin on Godot 4.2.1 by doing the following:

  1. Clone the repo
  2. Make sure I'm on the master branch
  3. Pull the billing-v5 branch into the master branch
  4. Resolve all merge conflicts by choosing whatever code is in the #52 pull request

TomSemeijn avatar Jan 22 '24 07:01 TomSemeijn

Hi Tom, after merging in the #52 PR, were you using the docs for the 4.2 Godot or were you using earlier docs?

PrabhTonicbits avatar Mar 06 '24 23:03 PrabhTonicbits

Hi Tom, after merging in the #52 PR, were you using the docs for the 4.2 Godot or were you using earlier docs?

I used the 4.2 docs :)

Here's a link to the specific page just to be sure: https://docs.godotengine.org/en/stable/tutorials/platform/android/android_in_app_purchases.html

TomSemeijn avatar Mar 07 '24 06:03 TomSemeijn

Hello Tom, can you send me the plugin you build for godot 4.2.1? i tried to build it but in the last step my gradle did not work correctly. Your help will really appreciated.

sagetec avatar Mar 07 '24 17:03 sagetec

Hi Tom, after merging in the #52 PR, were you using the docs for the 4.2 Godot or were you using earlier docs?

I used the 4.2 docs :)

Here's a link to the specific page just to be sure: https://docs.godotengine.org/en/stable/tutorials/platform/android/android_in_app_purchases.html

Thanks Tom!

Managed to understand what code was needed to be updated. Turns out the master branch just needed an updated gradle wrapper to 7.4.2, updating the Android build tools to 7.2.2 and updating the repository name in build.gradle file. With this Gradle compiles the master branch properly and should be good for 4.2.1!

If anyone needs help with gradle compile issues feel free to chuck me a message and I'll see if I can help out. I'll also look into getting a PR merged so no one needs to make these changes themselves. Until then people are free to use my fork and compile it. Should work as long as you have Java 17 installed. https://github.com/PrabhTonicbits/godot-google-play-billing

PrabhTonicbits avatar Mar 08 '24 03:03 PrabhTonicbits

Hello Tom, can you send me the plugin you build for godot 4.2.1? i tried to build it but in the last step my gradle did not work correctly. Your help will really appreciated.

Hi Sage, I have a compiled master branch for 4.2.1 https://file.io/Ctl5cdVtKcrz Let me know if this works for you Cheers!

PrabhTonicbits avatar Mar 08 '24 03:03 PrabhTonicbits

Hello Tom, can you send me the plugin you build for godot 4.2.1? i tried to build it but in the last step my gradle did not work correctly. Your help will really appreciated.

Hi Sage, I have a compiled master branch for 4.2.1 https://file.io/Ctl5cdVtKcrz Let me know if this works for you Cheers!

I just checked and it was deleted. I really need it. :(

image_2024-03-08_090148003

sagetec avatar Mar 08 '24 04:03 sagetec

Hello Tom, can you send me the plugin you build for godot 4.2.1? i tried to build it but in the last step my gradle did not work correctly. Your help will really appreciated.

Hi Sage, I have a compiled master branch for 4.2.1 https://file.io/Ctl5cdVtKcrz Let me know if this works for you Cheers!

I just checked and it was deleted. I really need it. :(

image_2024-03-08_090148003

Hi Sage, Sorry about that, it seems like the service I used does a onetime download link and I downloaded it to check if it was working lol! https://file.io/sjhd46VarCU8 Cheers!

PrabhTonicbits avatar Mar 08 '24 04:03 PrabhTonicbits

Thank you really much.

sagetec avatar Mar 08 '24 04:03 sagetec

@TomSemeijn Did try your fork, and i got a bit further. Now I do however get a bunch of these messages:

/Users/gillbergprivat/Dev/godot-google-play-billing-fork/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/utils/GooglePlayBillingUtils.java:33: error: cannot find symbol import org.godotengine.godot.Dictionary; ^ symbol: class Dictionary location: package org.godotengine.godot Any idea? :)

grusad avatar Apr 03 '24 21:04 grusad

@grusad It happened to me because I was moving the .arr to the wrong folder.

After forking the repo, it created a folder with the name godot-google-play-billing. My mistake was to create the folder libs directly inside of it. But there's another folder inside the fork named godot-google-play-billing. That's the folder to add the .arr file, fixing the problem in my case.

Illustrating:

  • godot-google-play-billing
    • godot-google-play-billing
      • libs
        • godot-lib.***.release.aar

Silly mistake, but took me hours to find out. xD

Katreque avatar May 27 '24 23:05 Katreque

Hello Tom, can you send me the plugin you build for godot 4.2.1? i tried to build it but in the last step my gradle did not work correctly. Your help will really appreciated.

Hi Sage, I have a compiled master branch for 4.2.1 https://file.io/Ctl5cdVtKcrz Let me know if this works for you Cheers!

I just checked and it was deleted. I really need it. :( image_2024-03-08_090148003

Hi Sage, Sorry about that, it seems like the service I used does a onetime download link and I downloaded it to check if it was working lol! https://file.io/sjhd46VarCU8 Cheers!

Oh no...

Not found again.

PlayboyCommando avatar Jul 31 '24 13:07 PlayboyCommando