newrelic / newrelic-flutter-agent

New Relic agent SDK for Flutter hybrid mobile apps
Apache License 2.0
6 stars 13 forks source link

Building fails on Android #129

Open eikebartels opened 8 hours ago

eikebartels commented 8 hours ago

Hello,

I'm trying to integrate the newRelic client in our flutter app.

For iOS it works quite well but for Android I'm running into problems. I followed the instructions on https://pub.dev/packages/newrelic_mobile#android-setup

I am using the latest version 1.1.5

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:minifyDevelopmentReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete, origin: /build/app/intermediates/classes/developmentRelease/ALL/classes.jar:com/marigold/sdk/internal/c/m0.class

It seems like the version is not compatible with

gradle_version = '7.4.2'
kotlin_version = '1.9.24'

Could you help me out or give me a hint in the right direction to fully integrate the newRelic SDK in our application? Thanks in advance

ndesai-newrelic commented 8 hours ago

@eikebartels can you share full build logs?

eikebartels commented 8 hours ago

hey @ndesai-newrelic sure

e: ..../build/newrelic_mobile/.transforms/a674b0ba0fdc9a38b893bdf40bde3315/transformed/out/jars/classes.jar!/META-INF/newrelic_mobile_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

........

ERROR:..../build/app/intermediates/classes/developmentRelease/ALL/classes.jar: R8: com.android.tools.r8.internal.sd: Different stack heights at jump target: 2 != 1

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:minifyDevelopmentReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
   > Compilation failed to complete, origin: .....build/app/intermediates/classes/developmentRelease/ALL/classes.jar:com/marigold/sdk/internal/c/c.class
ndesai-newrelic commented 7 hours ago

@eikebartels We have a fix ready for this issue, and we will release it by the end of this week. In the meantime, if you share your full build logs, I can help you fix the issue right away.

eikebartels commented 7 hours ago

@eikebartels We have a fix ready for this issue, and we will release it by the end of this week. In the meantime, if you share your full build logs, I can help you fix the issue right away.

Awesome! The end of this week is enough for use. Thanks a lot