1

I don't know why android studio is not able to resolve Client and Query from the import statements:

import com.algolia.search.saas.Client;
import com.algolia.search.saas.Query;

It is showing cannot resolve Client and Query on the both import statements.

This is present in my app Gradle file:

implementation 'com.algolia:instantsearch-android:1.15.0'

I tried invalidating caches and restart multiple times and even tried to change the version of Algolia dependency in Gradle file above, but nothing worked.

I am not able to understand why is this happening, I would appreciate if someone could help me in this.

Manhar
  • 107
  • 1
  • 11

3 Answers3

1

try this: https://www.algolia.com/doc/guides/building-search-ui/installation/android/

dependencies {
    // [...]
    implementation 'com.algolia:instantsearch-android:1.+'
    // This will automatically update to the latest v1 release of InstantSearch

    // OR
    implementation 'com.algolia:algoliasearch-android:3.+'
    // This will automatically update to the latest v3 release of the client
}
Nouman Ch
  • 4,023
  • 4
  • 29
  • 42
0

try including this also

implementation 'com.algolia:instantsearch-androidx-core:1.15.2'

Pankaj
  • 39
  • 2
0

I'm using the androidx libraries so your mileage may vary, but adding

    implementation 'com.algolia:algoliasearch-android:3.27.0'

resolved the problem for me.

M King
  • 91
  • 6