Error retrieving parent for item:No resource found that matches the given name 'Theme.AppCompat.Light'. MY R.java is missing

我与影子孤独终老i 提交于 2019-12-04 15:30:52

For me with the latest (21.0.2) version of Android Support Library the solution was to change the build target for appcompat_v7 project to API 21 (Android 5.0), clean and rebuild.

I solved the problem changing in gradle

compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:support-v4:21.0.0'

to

compile 'com.android.support:appcompat-v7:19.0.0'
compile 'com.android.support:support-v4:19.0.0'

and compile / target sdk to 19

Did you try updating the target SDK to 21 and building the project?

Got the same problem... Perhaps one solution is to download an old sdk and not updating it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!