gradle project sync failed . android studio

[亡魂溺海] 提交于 2019-12-25 06:35:08

问题


i'm new to android and i have a problem with this in the picture :

i tired to update constraint layout and constraint layout solver but each time i try to update in sdk manager update finish successfully but when i look at sdk manager again it's unchecked . for example after downloading constraint layout and constraint layout solver successfully :

but when i look at the android sdk path in the finder there is 4 version of constraint Layout installed : 1.0.0alpha7
1.0.0alpha2
1.0.1
1.0.2

i downloaded gradle 2.14 and copy and replace unzipped file with the default gradle 3.3 installed by android studio but ... no change !

can anyone plz help . i spend 5 hours on this and nothing changed


回答1:


As indicated in the error message, the problem is with the AppCompat support library, not the ConstraintLayout library. Specify a particular version or add an * after the major version code, like so:

compile 'com.android.support:appcompat-v7:25.3.1'

or

compile 'com.android.support:appcompat-v7:25.*'




回答2:


Click on this text:

and then press Right Alt + Enter (shortcut for quick fixes) -> Select the first suggestion which should state something like Change version to...25.x.x.

This will ensure that you will be using the newest version.



来源:https://stackoverflow.com/questions/43238592/gradle-project-sync-failed-android-studio

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