keenlabs / KeenClient-Java

Official Java client for the Keen IO API. Build analytics features directly into your Java apps.
https://keen.io/docs
MIT License
74 stars 43 forks source link

Build fails with Android Gradle plugin 4.1.0 and above #120

Closed victorkifer closed 3 years ago

victorkifer commented 3 years ago

I'm having issues building android app with Android Gradle plugin 4.1.0 or newer.

build.gradle

implementation 'io.keen:keen-client-api-android:5.6.0'

The error I'm getting is:

error: illegal forward reference import io.keen.client.java.http.Response;

Which refers to the place where I import keen classes.

The same code builds properly with older versions of Android Gradle plugin so it seems the library is incompatible with Android Gradle plugin 4.1.0 or newer.

victorkifer commented 3 years ago

Issue is fixed. The error was caused by KEEN_URL generated by buildConfigField in our app. For some reason compiler incorrectly was blaming line with the import.