Can Poyrazoğlu Can Poyrazoğlu - 19 days ago 7
Android Question

Android Studio can't find Android Support Library classes

I was using Android SDK 25, but due to a bug with SDK 24 and above, I've reverted back to SDK 23. I was also using support library v25 too. I needed to revert back to support library v23.x as otherwise Gradle gave an error telling that support library major version can't be higher than the SDK version.

I've tried many different versions from Android Support Library Revision History in Gradle, but now, when I try to build my project, Android Studio can't find any of the library classes:

enter image description here

The error list goes on for anything from support library.

I've tried the answer to Android Studio can't find library classes after Gradle build and I've also tried invalidating caches and restarting, but no avail, still the same. In Gradle sync, I'm not getting any errors at all.

Here is the entry in my gradle:

compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.android.support:support-v4:23.0.0'


All I've done is reverting back to SDK v23. What am I doing wrong?

Answer

RecyclerView needs a separate dependency. Add

 compile 'com.android.support:recyclerview-v7:23.0.0'

to your build.gradle if you want to use it

Comments