PostHog / posthog-flutter

PostHog Flutter SDK
https://posthog.com/docs/libraries/flutter
MIT License
55 stars 37 forks source link

Gradle build failing due to missing PostHogConfig.defaultHost #96

Closed dancamdev closed 7 months ago

dancamdev commented 7 months ago

Version

4.4.0

Steps to Reproduce

  1. Open the example
  2. Run flutter build apk

Expected Result

Builds flawlessly

Actual Result

e: file:///Users/danielecambi/.pub-cache/hosted/pub.dev/posthog_flutter-4.0.0/android/src/main/kotlin/com/posthog/posthog_flutter/PosthogFlutterPlugin.kt:44:91 Unresolved reference: defaultHost

FAILURE: Build failed with an exception.

gellertkacso commented 7 months ago

Same happening for me as well, on version 4.3.0

marandaneto commented 7 months ago

Ups sorry, this field was renamed due to linting conventions, on it.

marandaneto commented 7 months ago

https://github.com/PostHog/posthog-flutter/releases/tag/4.4.1 should have fixed it, pub.dev has ~10min. caching in case its not fixed right away.

PeteClubSeven commented 7 months ago

Hey, it doesn't seem to have worked for me @marandaneto

e: file:///Users/peterc/.pub-cache/hosted/pub.dev/posthog_flutter-4.4.1/android/src/main/kotlin/com/posthog/posthog_flutter/PosthogFlutterPlugin.kt:44:91 Unresolved reference: DEFAULT_HOST

FAILURE: Build failed with an exception.
marandaneto commented 7 months ago

@PeteClubSeven maybe some gradle caching on your side?

✓ Built build/app/outputs/flutter-apk/app-release.apk (18.1MB)

PeteClubSeven commented 7 months ago

@PeteClubSeven maybe some gradle caching on your side?

✓ Built build/app/outputs/flutter-apk/app-release.apk (18.1MB)

Seems so. I ran flutter clean, flutter pub get, deleted the android/.gradle folder and my pub-cache. Nothing worked but I never deleted my $HOME/.gradle folder. Either way its working now with 4.4.1.