Question

Ionic Failed to build android app

  • 13 December 2023
  • 2 replies
  • 79 views

Badge

Hello, Team, hope you are doing well.

I upgraded revenueCat module to latest one in my ionic/angular project.
this is the module in package.json
"@revenuecat/purchases-capacitor": "^7.3.1"

it’s working on xCode without issue.

but I can’t build android build on Android Studio.

Execution failed for task ':revenuecat-purchases-capacitor:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 19) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

* 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.

This is the error log when building.

 

if I use old package, the android build will work without error.

"@awesome-cordova-plugins/purchases": "^6.4.0"
"cordova-plugin-purchases": "^5.5.1"

 

Can anyone help me to resolve this issue?


2 replies

Userlevel 3
Badge +8

Hi,

Thanks for sharing. Could you do the suggested “run with --debug” to get more logs? I’ll bring it to our SDK team to take a look.

Badge

Hello, @Ryan Glanz Thanks for your reply.

I want to share the full repository with revenueCat module.

https://github.com/timeisgolden/ionic-test

this is just a simple ionic/angular/capacitor project, which is created 3 days ago.

I just installed the latest revenuecat module, and tried to build android version, 

got the error I reported.

Reply