Gradle project refresh failed in Android Studio 1.2.1.1 -


i created sample project on fresh installation of android studio v 1.2.1.1 , faced error message:

gradle project refresh failed in android studio 1.2.1.1  

see image below:

enter image description here

so tried find solution on google , checked

gradle.properties file

where is:

dependencies {         classpath 'com.android.tools.build:gradle:1.2.2'          // note: not place application dependencies here; belong         // in individual module build.gradle files     } 

after tried update sdk libraries using sdk manager

and after tried find issue in settings (see image)

but without success. because in error description nothing don't know can wrong , repair.

any idea please?

many help.

note: compilaton using cordova (which using gradle too) without problems , app compiled.

enter image description here

for struggling error, here solution:

step 1) click in "android studio" (upper bar) -> "preferences" -> "build, execution, deployment" -> "build tools" -> "gradle"

and select "use local gradle distribution" , find path gradle file (eg. /applications/android studio.app/contents/gradle/gradle-2.8)

step 2) click in "file" (upper bar) -> "project structure" -> select "app" in "modules" section. then, make sure have set compiler sdk version , build tools version

step 3) open project -> open "build.gradle" file , remove following lines:

android {     compilesdkversion xx     buildtoolsversion 'xx.x.x' } 

step 4) click in "sync project gradle files" button.

full instructions here enter image description here


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

go - Idiomatic way to handle template errors in golang -