godot-sdk-integrations / godot-google-play-billing

Godot Android plugin for the Google Play Billing library
MIT License
156 stars 50 forks source link

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

Open blackcan opened 11 months ago

blackcan commented 11 months ago

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.

kyadalu1 commented 10 months ago

Try this

cmklu commented 10 months ago

followed the readme and just had the same error

TomSemeijn commented 9 months ago

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
PrabhTonicbits commented 8 months ago

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

TomSemeijn commented 8 months ago

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

sagetec commented 8 months ago

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.

PrabhTonicbits commented 8 months ago

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 commented 8 months ago

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!

sagetec commented 8 months ago

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

PrabhTonicbits commented 8 months ago

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!

sagetec commented 8 months ago

Thank you really much.

grusad commented 7 months ago

@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? :)

Katreque commented 5 months ago

@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:

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

PlayboyCommando commented 3 months ago

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.