Failed to resolve: com.android.support:cardview-v7

2018-12-31 02:16发布

i try to add recyclerview to my project and get this error appear and i added it from android studio dependencies this is error appear when try to add recyclerview in android studio

this is the compiled version ...

23条回答
墨雨无痕
2楼-- · 2018-12-31 02:17

2 Steps to fix this.. 1, connect to internet. 2, Click on clean project. this will fix it :)

查看更多
倾城一夜雪
3楼-- · 2018-12-31 02:18

in may case I found OneSignal changed their dependencies

so I changed it from

compile 'com.onesignal:OneSignal:[3.5.8, 3.99.99]'

to

compile 'com.onesignal:OneSignal:[3.5.8, 3.5.8]'

then it works, please check any unspecific dependency.

查看更多
临风纵饮
4楼-- · 2018-12-31 02:19

try this,

goto Android->sdk make sure you have all depenencies required . if not , download them . then goto File-->Settigs-->Build,Execution,Depoyment-->Gradle

choose use default gradle wapper (recommended)

and untick Offline work

gradle build finishes successfully for once you can change the settings

查看更多
有味是清欢
5楼-- · 2018-12-31 02:19

For me I just had to clean my project.

Build -> Clean Project

Another time I had to:

File -> Sync Project with Gradle Files.

查看更多
千与千寻千般痛.
6楼-- · 2018-12-31 02:20
不再属于我。
7楼-- · 2018-12-31 02:22
compile 'com.android.support:cardview-v7:+' 

This should pull the most recent version, and allow it to compile.

查看更多
登录 后发表回答