While trying to build my repo I am running into following error:
MyAdapter.java:XY: error: package RecyclerView does not exist
static class MyViewHolder extends RecyclerView.ViewHolder
I am building with:
- Gradle 6.7
- on MacOS Catalina 10.15.7
- Android target SDK 30
- AndroidStudio 4.1.1
Gradle is configured for AndroidX:
android.useAndroidX=true
android.enableJetifier=true
I can see in project navigation of AndroidStudio that the dependency was downloaded
and I can navigate the editor inside the class RecyclerView.ViewHolder.
Also important to mention that my repo can be build w/o any issues on a Windows machine.
Repo contains several modules which have also classes that extends RecyclerView.ViewHolder but only this module fails to build on MacOS.
It seems that Gradle have different build process order in comparison to Gradle on Windows.
What I have tried:
- rm -rf ~/.gradle/caches
- ./gradlew cleanBuildCaches
- re-installation of Android SDK
- re-installation of Android Studio
- excluded transitive dependency
androidx.recyclerview:recyclerviewin libs by addingexclude group: 'androidx.recyclerview', module: 'recyclerview'
Does anybody had a similar issue or can give any suggestion to resolve this issue?