Today I install Android Studio in my new Pc, I tried to start a new project but I couldn´t because I have this error when I try to compile some new library of Material Design as CardView or RecyclerView, I was reading about this problem and I tried to do everything, I installed all SDK, I change the library versions a lot times, but I cant resolve this =(.
This is the picture of my error:
Please, any help will be greatfully. I can´t program if I dont resolve this.
Import with compile 'com.android.support:recyclerview-v7:22.2.1'
, this should work with API 22.
Click on Sync now
in the warning on top of the code window.
If it doesn't work, try Build -> Rebuild Project
. Seems that your gradle file doesn't refresh automatically
If it doesn't work check in the SDK Manager
that you have install all the SDK pachages needed for those libraries and rebuild again.
Add card view lib from Open module settings-> app -> dependencies-> + -> Library dependency. It will be perfect . this happens you have updated version 22 installed in your sdk and not the previous version 21 .
or use compile 'com.android.support:cardview-v7:22.2.1'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.